Unable to load System.Net.Http.Primitives on Xamarin iOS

I have an old Xamarin forms project that I updated that uses Microsoft Azure Mobile App Services (previously used Azure Mobile Services).

It worked fine, but after cleaning and restoring, I now get this error when I try to start it (I use Xamarin Studio)

Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 

Microsoft.Azure.Mobile.Client and SQLiteStore are on version 2.0.1. I tried to remove and read the assembly through NuGet, with no luck.

Has anyone seen this problem or resolved it?

+5
source share
3 answers

Xamarin iOS (monotouch) is dependent on System.Net.Http.Primitives version 4.2.29.0 , and version 1.5.0.0 is for the portable-net40 + sl4 + win8 + wp71 + wpa81 platform. As Eric Headstrom said, have you tried the steps from this answer?

+2
source

The solution here was to recreate the Xamarin projects and repeat the portable class library of the old project.

0
source

I came across a similar error in my solution with a native Xamarin.iOS project that uses ModernHttpHandler .

Try adding a link to the standard Mono System.Net.Http in the csproj file:

 <Reference Include="System.Net.Http" /> 

See this blog post for more details.

0
source

All Articles