Export (0) Print
Expand All
4 out of 6 rated this helpful - Rate this topic

Publisher Configuration

A publisher configuration file globally redirects applications and assemblies having a dependence on one version of a side-by-side assembly to use another version of the same assembly. This enables applications and assemblies to use the updated assembly without having to rebuild all of the affected applications.

Publisher configuration files may be provided by the publisher of an assembly when issuing a new version of the assembly with compatible bug fixes or security updates. The updated version should be fully backward compatible. A publisher configuration file should never be used to add new features unless the update is fully backward compatible. Publisher configuration files should never be used to increment the major or minor version of an assembly. For example, do not redirect assembly version 6.0.0.0 to 7.0.0.0 or to 6.1.0.0.

Publisher configuration files should only be issued by the publisher of the assembly. Assembly developers should sign shared side-by-side assemblies and publisher configuration files. Use the same key to sign the assembly and the associated publisher configuration files. Publisher configuration files should be signed using the same tools as used for assemblies, see Assembly Signing Example and Creating Signed Files and Catalogs.

Typically, the new version of an assembly and the associated publisher configuration file will be installed in a service pack update. Publisher configuration files should never be provided with applications as a redistributable because installing a publisher configuration file globally redirects assemblies on the system. If the assembly being updated is provided as a redistributable, the publisher should provide both of the following.

  • A Windows Installer package (.msi file) that includes the new version of the assembly with publisher configuration. This may be installed as a service pack or QFE because in this case the customer has chosen to globally update the system. This version of the package should never be installed by applications.
  • A Windows Installer merge module (.msm file) that only includes the new version of the assembly. This version may be included with applications.

Applications requiring a minimum version of the assembly should state their dependency on the minimum version, if the minimum version is unavailable on a system then the application will fail to start. If it is available as a redistributable then it should be included in the application setup.

For example, installing the following publisher configuration file redirects binding from version 2.0.0.0 of the Microsoft.Windows.SampleAssembly to version 2.0.1.0. This adds a new policy, named 1.1.0.0.Policy, under %systemDrive%\windows\winsxs\policies\x86_policy.2.0.Microsoft.Windows.SampleAssembly_75e377300ab7b886_x-ww_<hashvalue>.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
   <assemblyIdentity type="win32-policy" publicKeyToken="0000000000000000" name="policy.2.0.Microsoft.Windows.SampleAssembly" version="1.1.0.0" processorArchitecture="x86"/>
   <dependency>
      <dependentAssembly>
         <assemblyIdentity type="win32" name="Microsoft.Windows.SampleAssembly"  processorArchitecture="x86" publicKeyToken="75e377300ab7b886"/>
         <bindingRedirect oldVersion="2.0.0.0" newVersion="2.0.1.0"/>
      </dependentAssembly>
   </dependency>
</assembly>

Installing the following publisher configuration file for the same assembly redirects binding from version 2.0.0.0 of the Microsoft.Windows.SampleAssembly to version 2.0.3.0. This adds another policy, named 2.1.0.0.Policy, under %systemDrive%\windows\winsxs\policies\x86_policy.2.0.Microsoft.Windows.SampleAssembly_75e377300ab7b886_x-ww_<hashvalue>.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
   <assemblyIdentity type="win32-policy" publicKeyToken="0000000000000000" name="policy.2.0.Microsoft.Windows.SampleAssembly" version="2.1.0.0" processorArchitecture="x86"/>
   <dependency>
      <dependentAssembly>
         <assemblyIdentity type="win32" name="Microsoft.Windows.SampleAssembly"  processorArchitecture="x86" publicKeyToken="75e377300ab7b886"/>
         <bindingRedirect oldVersion="2.0.0.0" newVersion="2.0.3.0"/>
      </dependentAssembly>
   </dependency>
</assembly>

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.