title: Weird .NET Assembly warnings when building my .NET web application
body: <p>When I build my ASP.NET web application I'm seeing the following weird warnings in my build output.</p>
  
  <pre><code>1&gt;------ Build started: Project: Hornet.Api, Configuration: Debug Any CPU ------
  1&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;  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&gt;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: &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="Microsoft.ApplicationInsights" culture="neutral" publicKeyToken="31bf3856ad364e35" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-2.3.0.0" newVersion="2.3.0.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Text.RegularExpressions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Net.Http" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Diagnostics.Tracing" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Reflection" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.IO.Compression" culture="neutral" publicKeyToken="b77a5c561934e089" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Runtime.Extensions" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="Microsoft.Azure.KeyVault.Core" culture="neutral" publicKeyToken="31bf3856ad364e35" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Runtime.InteropServices" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;&lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;dependentAssembly&gt;&lt;assemblyIdentity name="System.Linq" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /&gt;&lt;bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /&gt;&lt;/dependentAssembly&gt;&lt;/assemblyBinding&gt;
  </code></pre>
  
  <p>My solution has two projects:</p>
  
  <ul>
  <li>Website (ASP.NET v4.7)</li>
  <li>Tests (.NET v4.7)</li>
  </ul>
  
  <p>So i'm not sure where these warnings are applying to - which project?</p>
  
  <p>Also, I've checked both the (website proj) <code>web.config</code> and (tests proj) <code>app.config</code> for the <code>AssemblyBindings</code> and they are all pointing to the latest .. like this is in both files:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
          &lt;assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /&gt;
          &lt;bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /&gt;
        &lt;/dependentAssembly&gt;
  
   .....
  </code></pre>
  
  <p>So why is the compiler thinking there's a conflict with various versions of Newtonsoft.Json ? I've only installed one version ...</p>
  
  <p>I've also got assemblybindings in place and they all seem to point to the latest version installed, also.</p>
  
  <h3>Update</h3>
  
  <ul>
  <li>This is a snippet of my <code>packages.config</code></li>
  </ul>
  
  <p><code>&lt;package id="Newtonsoft.Json" version="10.0.2" targetFramework="net47" /&gt;
  </code></p>
  
  <p>That's in BOTH projects, btw</p>
  
  <p>and this...
  <a href="https://i.stack.imgur.com/koToo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/koToo.png" alt="enter image description here"></a></p>
  
  <h3>Update 2</h3>
  
  <p>here's the <code>hintpath</code> which is the same for both projects...</p>
  
  <pre><code>&lt;Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;..\..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <h3>Update 3</h3>
  
  <p>OK - this is interesting.</p>
  
  <ul>
  <li>Turn on <code>VERBOSE</code> build info</li>
  <li>I can now see <em>heaps</em> more data. The first warning is saying that my <a href="http://www.nuget.org/packages/Google.Apis.QPXExpress.v1/" rel="noreferrer">nuget package <code>Google.Apis.QpxExpress.v1</code></a> ends up having a dependency on <code>Google.Apis.Core</code> which has a dependency on Json v 9.0.0.</li>
  <li>My web.config file HAS the binding redirects! (see above).</li>
  </ul>