Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Net.Http is missing [duplicate]

I am trying to download mp3 files using HTTPClient in System.Net.Http namespace, but it looks vs 2012 doesn't recognize it. I created project under .Net 4.5 and it's not recognized.

I am looking to use HttpClient, I see some posts stating that add this from NuGet, but I don't how to find that in NuGet? or at least add a reference to this?

like image 925
ARH Avatar asked Jan 17 '14 10:01

ARH


People also ask

What is System Net HTTP?

Provides a programming interface for modern HTTP applications, including HTTP client components that allow applications to consume web services over HTTP and HTTP components that can be used by both clients and servers for parsing HTTP headers. Commonly Used Types: System.

What is System net in C#?

Provides a simple programming interface for many of the protocols used on networks today. Classes in the System.Net namespace can be used to develop Windows Store apps or desktop apps.


1 Answers

Just click on

Tools>Library Package Manager>Package Manager console

Then you will see a command prompt under source edit area.

then type Following Command

ex: PM> Install-Package System.Net.Http -Version 2.0.20710

Hope this will be helpful ( This is for VS2010, Hopefully this would be same to VS2012 as well )

like image 189
Daryl Avatar answered Oct 06 '22 19:10

Daryl