Search code examples
c#xamarinxamarin-studio

No HttpClient in xamarin


I recently downloaded and installed xamarin studio for my mac. I then began following a tutorial for c# coding with xamarin as I am a complete beginner. During the tutorial they use a HttpClient and add

using System.Net.Http

to their project so they can use the HttpClient. I was unable to do the same and only had the option of

using System.Net.NetworkInformation

This was a PCL project. I also tried a shared library project which gave more options including Cache, Mail, Sockets, Websockets, Security etc.

Am I missing something or doing something wrong.


Solution

  • You need to add the Microsoft.Net.Http NuGet package.