I am trying to upgrade Unity
to version (2.1.505.2), but when I run the application I get the following FileLoadException
Could
The binding redirect should be pointed to a proper assembly version.
For your case version 2.1.505.0 should be used!
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.505.0" newVersion="2.1.505.0" />
</dependentAssembly>
</assemblyBinding>
2.1.505.2 cannot be specified because of next reason:
Unity assembly 2.1.505.2 has different versions specified in the AssemblyFileVersion and AssemblyVersion.
CLR is working with the AssemblyVersion and AssemblyFileVersion is ignored but NuGet is working with the AssemblyFileVersion!
So that's why you have this difference!
Please use AssemblyVersion