Saturday, July 2, 2016

Cannot load System.Net.Http.Primitives in Xamarin iOS

Leave a Comment

I have an older Xamarin forms project that I've updated, that uses Microsoft Azure's Mobile App Services (previously used Azure Mobile Services).

Was working fine, but after a clean and rebuild I now get this error whenever attempting to run it (I'm using 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 at version 2.0.1. I've tried removing and readding the assembly via NuGet, without any luck.

Has anyone seen this issue or resolved it?

2 Answers

Answers 1

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

Answers 2

Solution here wound up being recreating the Xamarin projects, and relinking the portable class library of the old project to it.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment