Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms IOS Failed to load assembly System.Net.Http.Primitive

I'm trying to do a release build for an IOS app using Xamarin.Forms in Visual Studio 2015.

Under the iOS Build menu in the properties of the app, If I set the Linker behaviour Link SDK assemblies only or Link all assemblies - I get the following build error:

Failed to resolve assembly: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' BlackhawkPlatform.App.iOS

If I don't link any of the assemblies - the App builds fine but the output ipa is over 40mb big 0 uncompressed over 100mb and as such cannot be submitted to iTunes Connect.

I have the latest version installed of System.Net Client libraries and Xamarin Forms.

enter image description here

I have tried to skip the assembly link by using the command --linkskip=System.Net.Http.Primitives in the Additional mtouch argument box but that dos not work.

Any idea how I can get around this please?

like image 987
TResponse Avatar asked Mar 10 '16 20:03

TResponse


1 Answers

Found a solution which worked.

  1. In Nuget package manager install the latest version of Microsoft.BCL.Build v1.0.21
  2. then install the latest version of Microsoft.Net.Http v2.2.29

This worked for me.

like image 115
TResponse Avatar answered Nov 15 '22 04:11

TResponse