Xamarin表单IOS无法加载程序集System.Net.Http.Primitive [英] Xamarin Forms IOS Failed to load assembly System.Net.Http.Primitive
问题描述
我正在尝试使用Visual Studio 2015中的Xamarin.Forms为IOS应用程序执行发布版本。
I'm trying to do a release build for an IOS app using Xamarin.Forms in Visual Studio 2015.
在iOS Build菜单中的属性中应用程序,如果我只设置链接器行为链接SDK程序集或链接所有程序集 - 我得到以下构建错误:
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:
无法解析程序集:'System.Net.Http.Primitives,
Version = 1.5.0.0,Culture = neutral,
PublicKeyToken = b03f5f7f11d50a3a'BlackhawkPlatform.App.iOS
Failed to resolve assembly: 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' BlackhawkPlatform.App.iOS
如果我没有链接任何程序集 - 应用程序构建正常,但输出ipa超过40mb大0未压缩超过100mb因此无法提交到iTunes Connect。
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.
我安装了System.Net客户端库和Xamarin Forms的最新版本。
I have the latest version installed of System.Net Client libraries and Xamarin Forms.
我有试图通过在附加mtouch参数框中使用命令 - linkskip = System.Net.Http.Primitives
跳过程序集链接,但这不起作用。
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?
推荐答案
找到了一个有效的解决方案。
Found a solution which worked.
- 在Nuget包管理器中安装最新版本的 Microsoft.BCL.Build v1 .0.21
- 然后安装最新版本的 Microsoft.Net.Http v2.2.29
- In Nuget package manager install the latest version of Microsoft.BCL.Build v1.0.21
- then install the latest version of Microsoft.Net.Http v2.2.29
这对我有用。
这篇关于Xamarin表单IOS无法加载程序集System.Net.Http.Primitive的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!