You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering using Refit in an environment with both .NET 6.0 and legacy .NET Framework services. However, I noticed that Refit has a reference to System.Net.Http 4.3.4. Transitive references to this package in .NET Framework projects have caused us major headaches in the past. The official recommendation is to avoid referencing the package.
While most issues are not present in .NET Framework 4.7.2 and SDK-style projects, this is not always the case with older projects. For example, in Web Site projects, the outdated version of System.Net.Http as well as outdated version of many other runtime libraries such as System.IO are copied to the Bin folder by default. This can and will break user code that depends on .NET Framework 4.7.2 behavior, such as HttpClientHandler.SslProtocols, which throws an exception in the older versions.
As for why Refit references it in the first place, I found this issue but it seems to be unrelated to the functioning of Refit, instead having to do with some broken build system.
Please consider removing the reference.
The text was updated successfully, but these errors were encountered:
System.Net.Http.Json has been removed from non .NetFramework and .NetStandard versions as a first step, I will check the reason for the System.Net.Http reference being there
I'm considering using Refit in an environment with both .NET 6.0 and legacy .NET Framework services. However, I noticed that Refit has a reference to
System.Net.Http 4.3.4
. Transitive references to this package in .NET Framework projects have caused us major headaches in the past. The official recommendation is to avoid referencing the package.While most issues are not present in .NET Framework 4.7.2 and SDK-style projects, this is not always the case with older projects. For example, in Web Site projects, the outdated version of
System.Net.Http
as well as outdated version of many other runtime libraries such asSystem.IO
are copied to theBin
folder by default. This can and will break user code that depends on .NET Framework 4.7.2 behavior, such asHttpClientHandler.SslProtocols
, which throws an exception in the older versions.As for why Refit references it in the first place, I found this issue but it seems to be unrelated to the functioning of Refit, instead having to do with some broken build system.
Please consider removing the reference.
The text was updated successfully, but these errors were encountered: