Depends on the version. Older System.Net.Http ( 2.0 ) packages are obsolete packages that have been deprecated in favor of Microsoft.Http.Net as described:
The Legacy package, System.Net.Http is now included in the Microsoft.Net.Http Package.
They exist to provide HttpClient in previous versions of .NET and the Portable Class libraries. You must use Microsoft.Net.Http in this case.
Since you are using .NET Core, you should use the latest System.Net.Http package (e.g. 4.1.0).
If your project.json targets both full .NET and .NET Core, you need to add the System.Net.Http assembly to the frameworkAssemblies element. For example:
"frameworks": { "net451": { "frameworkAssemblies": { "System.Net.Http": "4.0.0.0" // HttpClient for full .NET } }, "netstandard1.3": { "dependencies": { "System.Net.Http": "4.1.0", // HttpClient for .NET Core } } }
Henk Mollema Jun 25 '15 at 15:04 2015-06-25 15:04
source share