【问题标题】:Error while debugging a Xamarin iOS System.Net.HttpMessageHandler调试 Xamarin iOS System.Net.HttpMessageHandler 时出错
【发布时间】:2014-08-08 00:49:47
【问题描述】:

我是 Xamarin 的新手... 我正在尝试在 Mac 上使用 Xamarin Studio 构建 iOS 应用程序,我也在尝试使用 Azure 移动服务,但出现以下错误:

System.Net.HttpMessageHandler 类型是在未引用的程序集中定义的。考虑添加对程序集 'System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (CS0012) 的引用

关于以下代码:

public static MobileServiceClient client = new MobileServiceClient("URL","Key");

有人知道怎么回事???

【问题讨论】:

    标签: c# xamarin.ios azure-mobile-services xamarin-studio


    【解决方案1】:

    我在开发跨平台应用程序时遇到了同样的问题。我只是在我的 android 项目中添加了对 System.Net.Http 的引用,这解决了问题。我假设您的 IOS 项目也可能同样适用。

    【讨论】:

    • 只需添加对 System.Net.Http 的引用对我有用。
    【解决方案2】:

    我建议将 HttpClient PCL Nuget 包以及 BCL.Async PCL 包添加到您的项目中。

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多