Reputation: 123
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?
Upvotes: 4
Views: 1929
Reputation: 115
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.
Upvotes: 2
Reputation: 10139
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
Upvotes: 6