简体   繁体   中英

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:

The type System.Net.HttpMessageHandler is defined in an assembly that is not referenced. Consider adding a reference to assembly '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. I'm assuming the same might work for your IOS project as well.

I would suggest adding the HttpClient PCL Nuget package as well as the BCL.Async PCL package to your project.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM