Binding a version in two version of same assembly in GAC.

You need to specify “bindingRedirect” in your config file. For
instance in the below case “ClassLibraryVersion” has two versions “1.1.1830.10493” and “1.0.1830.10461” from which “1.1.1830.10493” is the recent version. However, using the bindingRedirect we can specify saying “1.0.1830.10461” is the new version. Therefore, the client will not use “1.1.1830.10493”

<Configuration>
 <runtime>
  <assemblyBinding xmlns="urn: schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="ClassLibraryVersion"
            PublicKeyToken="b035c4774706cc72"
            Culture="neutral"/>
            <bindingRedirect oldVersion= "1.1.1830.10493"
            NewVersion= "1.0.1830.10461"/>
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
</configuration>

Popular Posts