In R9 repository there are only PackageReference Include="System.Net.Http"
In dotnet/extensions repository there is only Reference Include="System.Net.Http"
I have tried to add Microsoft.Extensions.Http.Resilience package reference to internal R9 project and got compilation error in sample project (project consumes R9 nuget packages and demonstrates common use cases):
error MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved.
error MSB3277: There was a conflict between "System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
error MSB3277: "System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not..
After that I had replaced reference with obsolete resilience package from R9 (..\Obsolete\HttpClient.Resilience\HttpClient.Resilience.csproj) and everything worked as expected.
Questions:
What is intention behind different choices (PackageReference vs Reference) for System.Net.Http?
I believe sample project can be fixed with binding redirects or any other way, but it means every partner on net462 should perform the same change. Any idea how to add Microsoft.Extensions.Http.Resilience package reference without compilation error and any additional change on partners side?
In
R9
repository there are onlyPackageReference Include="System.Net.Http"
Indotnet/extensions
repository there is onlyReference Include="System.Net.Http"
I have tried to add
Microsoft.Extensions.Http.Resilience
package reference to internal R9 project and got compilation error in sample project (project consumes R9 nuget packages and demonstrates common use cases):After that I had replaced reference with obsolete resilience package from R9 (
..\Obsolete\HttpClient.Resilience\HttpClient.Resilience.csproj
) and everything worked as expected.Questions:
PackageReference
vsReference
) forSystem.Net.Http
?Microsoft.Extensions.Http.Resilience
package reference without compilation error and any additional change on partners side?