Consider removing reference to `System.Net.Http` NuGet package
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.
Any update on this one? I'm facing issues with Refit and other involved projects because of this dependency
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
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.