Reputation: 80
I have just create a cross platform application in Xamarin. I created one function in a shared project in which it deserializes the JSON string into object/s but there is no way to add reference for Newtonsoft .
how can i use the reference in shared project ?
Upvotes: 0
Views: 458
Reputation: 139
If you are using VS just click on tool-> Nuget package manager -> Manage Nuget package for solution and Install Newtonsoft.json after select all the platform in checkbox.
Now you can use it in your share project also.
Upvotes: 3
Reputation: 136
In a shared project you'll use the references that are in the Android or iOS project. Thats why it's a shared project. Just add the refrence from nuget to your Android and iOS project and you should be good.
For more information: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/shared_projects/
Upvotes: 2