The type or namespace name 'Http' does not exist?

19,277

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

Share:
19,277
Jason94
Author by

Jason94

Feed me technology!

Updated on June 13, 2022

Comments

  • Jason94
    Jason94 almost 2 years

    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:

    • System.Net.Http
    • System.Net.Http.Extensions
    • System.Net.Http.Primitives

    The class I'm trying to use is HttpClient in my portable class library :-/

    enter image description here