Reputation: 23
How can I get visual studio 2012 to use the namespace for
using System.Net.http;
I can't find any solution for it. (direct solution)
Upvotes: 2
Views: 3262
Reputation: 6813
The System.Net.Http
namespace is only available in .NET Framework 4.5. Make sure that your project is targeting .NET 4.5 and then try adding it from the references dialog.
To change the project configuration, right-click the project in solution explorer and click Properties
. Go to the Application
tab and select the desired framework in the Target Framework
combo box.
Upvotes: 2
Reputation: 101681
You should add a referenc to System.Net.Http.dll
from your project. To do this in your Solution Explorer
Right Click your References
then click Add Reference
.Search for System.Net.Http
, add it to your references. Then you can use "using System.Net.Http;"
See the documentation for more details: How to: Add or Remove References By Using the Add Reference Dialog Box
Upvotes: 3