Is it possible to perform an assembly binding redirect between different versions of a referenced assembly if the public key token is null on the older version and set on the newer version?
For example, I have two assemblies...
System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
and
System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Should the following assembly binding redirect work in the Asp.Net web.config...
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…