[英]Error while debugging a Xamarin iOS System.Net.HttpMessageHandler
I am new on Xamarin... I am trying to build a iOS application using Xamarin Studio on a mac, i am trying to use Azure Mobile Services too, but i get the following Error: 我是Xamarin的新手...我正在尝试在Mac上使用Xamarin Studio构建iOS应用程序,我也尝试使用Azure移动服务,但是出现以下错误:
The type System.Net.HttpMessageHandler is defined in an assembly that is not referenced. System.Net.HttpMessageHandler类型在未引用的程序集中定义。 Consider adding a reference to assembly 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (CS0012)
考虑添加对程序集'System.Net.Http,Version = 1.5.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a(CS0012)的引用
on the following code: 在以下代码上:
public static MobileServiceClient client = new MobileServiceClient("URL","Key");
Somebody knows whats going on??? 有人知道发生了什么事吗???
I just had the same issue while working on a cross platform app. 在跨平台应用程序上工作时,我遇到了同样的问题。 I simply added a reference to System.Net.Http in my android project and this resolved the problem.
我只是在我的android项目中添加了对System.Net.Http的引用,从而解决了该问题。 I'm assuming the same might work for your IOS project as well.
我假设同样适用于您的IOS项目。
I would suggest adding the HttpClient PCL Nuget package as well as the BCL.Async PCL package to your project. 我建议将HttpClient PCL Nuget软件包以及BCL.Async PCL软件包添加到您的项目中。
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.