Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare System.Net.Http as a framework dependency
Declaring System.Net.Http as a nuget dependency for net47 is problematic for some consuming projects because it offers assembly version 4.1.1.3, whereas the FluentAssertions assembly itself references 4.2.0.0 of that same assembly. This causes the C# compiler to break the build for these projects. The fix is to declare that System.Net.Http comes from an ordinary `Reference` item that is supplied by the target framework (which in fact it should as it does for FluentAssertions itself) instead of from the NuGet package. It is interesting to call out that although this project previously declared `System.Net.Http` as a `PackageReference`, msbuild nevertheless chose to use the targeting framework version instead of the nuget version. This is ... not something I can explain. And many other projects have the same behavior, which is why it typically works for consuming projects. I don't know why exactly, but some projects do _not_ share this behavior, and those that actually use the nuget dependency that was declared here (before this change) would fail to compile. Fixes #2121
- Loading branch information