The simplest, is to modify the assembly bindings to redirect one version of an assembly to another.
In the example below the bindingRedirect allows requests for version 1.0.0.0 of this particular assembly to be serviced by version 2.0.0.0. So long as we’re sure the deserializing functionality is compatible, this solves the problem without having to change any code.
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Configuration" publicKeyToken="........." culture=""/> <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" /> <codeBase href="C:\bin\Configuration.dll" version="2.0.0.0" /> </dependentAssembly> </assemblyBinding>
Great stuff. Thanks for this.
ReplyDelete