Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Two versions of System.Net.Http

Tags:

I have difficulties to understand dual existence of System.Net.Http. It exists as a part of .Net Framework 4.7 (in version 4.0.0.0), but is also available as a separate package in much newer version (version 4.3.2 as of now).

Why is it available twofold? Why latest available version (probably 4.3) has not been included in .Net Framework 4.7 when it was released?

like image 747
Megrez7 Avatar asked Aug 19 '17 21:08

Megrez7


People also ask

What is System Net HTTP?

HttpClient Class (System. Net. Http) Provides a class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.

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

First, package version and assembly version can be different versions.

Package System.Net.Http, version 4.3.2: Assembly version is 4.1.1.1

I can't find a released package for System.Net.Http with assembly version 4.0.0.0, so I think that it's not distributed as a package, but there is at least one prerelease package which has that assembly, System.Net.Http, version 4.0.0-beta-22416. It seems that all prerelease packages from version 4.0.0-beta-22416 to version 4.0.1-rc2-24027 have .NET Framework versions of the assembly, with version 4.0.0.0.

.NET Framework 4.7 supports the APIs that exist in System.Net.Http, Version=4.0.0.0 and if you want extra functionality, you can pull extra APIs by installing a newer package, like you would do with any other package.

like image 52
José Pedro Avatar answered Oct 11 '22 13:10

José Pedro