I'm currently using Visual Studio 2017 Enterprise edition. The issue I'm running into is that every time I install the latest System.Net.Http nuget package (4.3.3) into a project, the System.Net.Http reference seems to prefer to point to the VS Enterprise extensions version of System.Net.Http:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net471\lib\System.Net.Http.ddl
I tried everything to force it to use the nuget version including binding redirects:
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.2" newVersion="4.1.1.2" />
</dependentAssembly>
and setting the "HintPath" in the .csproj file:
<Reference Include="System.Net.Http, Version=4.1.1.2, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.3\lib\net46\System.Net.Http.dll</HintPath>
</Reference>
But it still just keeps snapping back to the above VS Enterprise extensions version. I need to be able to use the nuget version of System.Net.Http dll because I have another library (Serilog) that depends on it.
Two questions: (1) Why does this happen? (2) How do I force it to ignore the VS Enterprise version of it?