An application configuration file, machine configuration file, or a publisher policy file can redirect one version of an assembly to another. You can use the .NET Framework Configuration tool (Mscorcfg.msc) to redirect assembly versions at both the application level and the machine level, or you can directly edit the configuration file.
Note: You cannot redirect versions for assemblies that are not strong-named. The common language runtime ignores the version for assemblies that are not strong-named.
Redirecting Assembly Versions Using Publisher Policy
Vendors of assemblies can state that applications should use a newer version of an assembly by including a publisher policy file with the upgraded assembly. The publisher policy file, which is located in the global assembly cache, contains assembly redirection settings. Vendors use publisher policies only when the new assembly is backward compatible with the assembly being redirected.
You can bypassing Publisher Policy by using following tag in the app.config/web.config files.
< publisherPolicy apply="no" >
Redirecting Assembly Versions through App.config/Web.config files
Specify information for an assembly by placing information for each assembly inside a
Example:
< configuration >
< runtime >
< assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
< dependentAssembly >
< assemblyIdentity name="myAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" / >
< !-- Assembly versions can be redirected in application, publisher policy, or machine configuration files. -- >
< bindingRedirect oldVersion="1.0.0.0"
newVersion="2.0.0.0"/ >
< / dependentAssembly >
< dependentAssembly >
< assemblyIdentity name="mySecondAssembly" publicKeyToken="32ab4ba45e0a69a1" culture="en-us" / >
< !-- Publisher policy can be set only in the application configuration file. -- >
< publisherPolicy apply="no" >
< / dependentAssembly >
< / assemblyBinding >
< / runtime >
< / configuration >
Note: The
Reference: http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx
1 comment:
I, of course, a newcomer to this blog, but the author does not agree
Post a Comment