Resolving MSB3247 Conflicts Between Different Versions - When Binding Forwarding Already Exists

Does anyone know why we got MSB3247 assembly build errors (which recommend binding redirection) when binding redirection already exists?

We checked the usual check with detailed MSBuild and AsmSpy errors to check this.

An error in the diagnostic logs from MSBuild indicates:

C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,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="System.Web.Mvc" culture="neutral" publicKeyToken="31bf3856ad364e35" /><bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /></dependentAssembly></assemblyBinding> [Z:\PathTo\WebProject.csproj]

In our web.config for WebProject.csproj we have:

  <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
  </dependentAssembly>

On our development machines and current build servers, we do not get an error. But on some of the new machines that we create, we see it. I think this could be due to .NET 4.5.1 or a new, separate MS build toolkit?

, - ( , !)

+4

Source: https://habr.com/ru/post/1535037/


All Articles