Reputation: 13610
I have this portable class library, its settings it Windows Phone 8, Windows Store and .NET 4.5.
I'm trying to add the HttpClient, but after I add it by NuGet its runtime version is v4.0.30319, and when i try to using System.Net.Http
it states:
The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
The following is added as a reference, and was added by NuGet upon install:
The class I'm trying to use is HttpClient
in my portable class library :-/
Upvotes: 7
Views: 19481
Reputation: 5636
This MSDN blog post makes it clear that you need to use this special release of HttpClient.
To use the HttpClient package, right click on your solution, go to the Manage Nuget Packages dialog, search for Id Microsoft.Net.Http, and make sure “Include Prerelease” is turned on.
This was released last February, but I haven't seen any updates to indicate that it is now obsolete.
EDIT
Here's the page for the latest version of this package
Upvotes: 6