Create and install an assembly A with a Version number (e.g. 220.127.116.11) in the GAC. Now you wish to install an updated version of A in the GAC, but this time with the same major/minor number in the assembly version (e.g. 18.104.22.168). Now also suppose you are providing the publisher policy file with all versions of assembly A to redirect the applications to the highest version of assembly A present in the GAC.
See How to: Create a Publisher Policy: http://msdn.microsoft.com/en-us/library/dz32563a.aspx
When you install the policy file for assembly version 22.214.171.124 in the GAC, this will overwrite the policy file you installed for assembly version 126.96.36.199 because both the policy files have the same name: “policy.1.0.mainAssemblyName.dll”
Note that policy files are named in the following format policy.majorNumber.minorNumber.mainAssemblyName.dll
Resolve this problem by versioning the policy file the same as the assembly version, using the following command.
cmd> al /link:MyDll.dll.config /v:188.8.131.52 /out:policy.1.0.MyDll.dll /keyfile:mykey.key
This will result in a policy file named “policy1.0.myDll.dll,” and when you install this in the GAC, use cmd> gacutil /i policy1.0.myDll.dll.
You see this version 184.108.40.206 with the policy file in the GAC.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.
Artikel-id: 958925 - Laatst bijgewerkt: 17 okt. 2008 - Revisie: 1