[FIXED] Why Xamarin app not see using microsoft.net.http

Issue

I need use httpclient

I install nuget package – Microsoft.Net.Http

after I see in reference – Microsoft.Net.Http

but when I try add using:

using Microsoft.Net.Http;

visual studio say, that have only Microsoft.Win32

I try restart vs and rebuild and nothing.

Solution

Every class has a namespace. For HttpClient the namespace is System.Net.Http.HttpClient. To use HttpClient in your application you need:

using System.Net.Http;

Very often the Classes inside the nuget package will have a namespace that starts with the nuget package name, but that is not a requirement. In this case its different.

Answered By – Slack Groverglow

Answer Checked By – Senaida (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published