Feb 26, 2013 at 9:37 PM
Edited Feb 26, 2013 at 9:37 PM
I've got an internal NuGet package that is a .NET 4.5 assembly referencing System.Net.Http. When we install this package NuGet keeps adding the following:
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-184.108.40.206" newVersion="220.127.116.11" />
to the app.config - which then breaks the app because it should actually be using the .NET 4.0 version. I've tried adding this:
<frameworkAssembly assemblyName="System.Net.Http" targetFramework=".NETFramework4.5">
to the NuSpec which then adds the System.Net.Http reference correctly (though it's not automatically needed), but I'm still getting the binding redirect added.
I've checked the assembly in dotPeek and while initially it was referencing both mscorlib v2 & 4 (as we had .NET 2 assemblies) I've stripped them out so it only references mscorlib v4 to no affect.
Any pointers? Thanks!