I am not able to use Json.net in the portable library. I set the portable library to use profile 4.5 -78. It compile fine but during runtime, it throws file not found exception. Any body encountered the same issue?
Nuget is probably adding a reference to the portable-net45+wp80+win8
portable assembly for Json.NET, which is incompatible with the current versions of Xamarin. To get things working you can manually switch the reference to use portable-net40+sl4+wp7+win8
I'm having the same issue with the newer Nuget package (Newtonsoft.Json.6.0.1
). To solve the problem, I had to replace the HintPath
in the PCL csproj with portable-net40+sl5+wp80+win8+monotouch+monoandroid
.
For that, edit manually the csproj file, and locate this section:
<Reference Include="Newtonsoft.Json, Version=...">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\portable-net45+wp80+win8\Newtonsoft.Json.dll</HintPath>
</Reference>
and adapt the path to the DLL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With