简体   繁体   English

调试Xamarin iOS System.Net.HttpMessageHandler时出错

[英]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.

相关问题 iOS上的Xamarin Forms,而调试元素变为null - Xamarin Forms on iOS, while debugging elements turns to null 使用System.Net.Mail发送电子邮件时出错。 调试时要查找什么? - Error while sending an email with System.Net.Mail. What to look for when debugging? 在iPad Mini上调试时Xamarin形成Java.Interop错误 - Xamarin Forms Java.Interop error while debugging on IPad Mini 模拟 HttpMessageHandler 时未调用 SendAsync - SendAsync not called while mocking HttpMessageHandler StructureMap 异常代码:202 没有为 PluginFamily System.Net.Http.HttpMessageHandler、System.Net.Http、Version=4.2.0.0 定义默认实例 - StructureMap Exception Code: 202 No Default Instance defined for PluginFamily System.Net.Http.HttpMessageHandler, System.Net.Http, Version=4.2.0.0 通过iPhone调试Xamaron.iOS应用程序时生成错误 - Build Error while debugging the Xamaron.iOS application through iPhone ML.Net 在 Xamarin.Android 上工作但不在 Xamarin.iOS 上工作:System.Reflection.Emit - ML.Net working on Xamarin.Android but not on Xamarin.iOS: System.Reflection.Emit Xamarin Ios应用程序在运行调试时冻结 - Xamarin Ios Application Freezes when run on debugging Xamarin ios-从发件人访问标签属性时出错 - Xamarin ios - Error while accessing tag property from sender 在 xamarin.forms (ios) 中启动演示应用程序时出错 - error while starting demo application in xamarin.forms (ios)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM