When I create my ASP.NET web application, I see the following strange warnings in my build release.
1>------ Build started: Project: Hornet.Api, Configuration: Debug Any CPU ------ 1> No way to resolve conflict between "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily. 1> No way to resolve conflict between "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" and "Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed". Choosing "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" arbitrarily. 1> Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" from Version "9.0.0.0" [] to Version "10.0.0.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "Microsoft.ApplicationInsights, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "2.2.0.0" [] to Version "2.3.0.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\Microsoft.ApplicationInsights.2.3.0\lib\net46\Microsoft.ApplicationInsights.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Text.RegularExpressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Text.RegularExpressions.dll] to Version "4.1.0.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\System.Net.Http.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Net.Http.4.3.1\lib\net46\System.Net.Http.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Diagnostics.Tracing, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Diagnostics.Tracing.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Reflection, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Reflection.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Runtime.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\System.IO.Compression.dll] to Version "4.1.2.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime.Extensions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Runtime.Extensions.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "Microsoft.Azure.KeyVault.Core, Culture=neutral, PublicKeyToken=31bf3856ad364e35" from Version "1.0.0.0" [] to Version "2.0.0.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Runtime.InteropServices, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.20.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Runtime.InteropServices.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll] to solve conflict and get rid of warning. 1> Consider app.config remapping of assembly "System.Linq, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7\Facades\System.Linq.dll] to Version "4.1.1.0" [C:\Projects\Personal\Hornet\Hornet.Api\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll] to solve conflict and get rid of warning. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.ApplicationInsights" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.3.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Diagnostics.Tracing" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Reflection" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.IO.Compression" culture="neutral" publicKeyToken="b77a5c561934e089" /><bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Microsoft.Azure.KeyVault.Core" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime.InteropServices" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Linq" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding>
My solution has two projects:
- Website (ASP.NET v4.7)
- Tests (.NET v4.7)
So I'm not sure what these warnings are for - which project?
In addition, I checked both (the proj website) web.config and the (proj) app.config tests for AssemblyBindings , and they all point to the latter. For example, this is in both files:
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> </dependentAssembly> .....
So why does the compiler think of a conflict with different versions of Newtonsoft.Json? I installed only one version ...
I also have an assembly in place, and they all all seem to point to the latest installed version.
Update
- This is a snippet of my
packages.config
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net47" />
What's in the projects of BOTH, btw
and this... 
Update 2
here's a hintpath that is the same for both projects ...
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference>
Update 3
OK - this is interesting.
- Include
VERBOSE build information - Now I can see more data. The first warning says that my nuget package Google.Apis.QpxExpress.v1 ends up having a dependency on
Google.Apis.Core , which has a dependency on Json v 9.0.0. - My web.config file has binding redirects! (see above).