Using Publisher policy files

A Publisher policy file can be distributed by the publisher of the assembly along with the update fix to a shared assembly. This file directs all references from an older assembly version to the newly installed version. Unlike the application configuration files, Publisher policy files need to be deployed in the global assembly cache (GAC) to become functional.

The settings in the Publisher policy file override the version information that comes from the application or application configuration file. However, specific applications can be set up to ignore the Publisher policy file by enforcing "safe mode." Refer to the MSDN Library for information on setting applications to use safe mode.

Updates to ASE ADO.NET Data Provider usually include a Publisher policy file that redirects applications to the latest installed version of the Data Provider assembly. If the installation program detects that .NET Framework SDK 1.1 is installed on the system, it also deploys the new provider assembly and the Publisher policy file in the GAC. Refer to the previous section on how to manually deploy these files into the GAC.

Publisher policy file provided with 1.15

The policy file provided with the 1.15 driver redirects the older versions of drivers to the latest version. To redirect older drivers (1.0 or 1.1), a new policy file must be created. You can use a configuration file, as described in the previous paragraph, or rebuild the application using the new assembly.

Rebuilding the application using the new assembly

StepsRebuilding the application

  1. Modify the Publisher policy file shipped with 1.15 in a file called policy.1.15.Sybase.Data.AseClient:

    <configuration>   <runtime>      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentAssembly>         <assemblyIdentity name="Sybase.Data.AseClient"                           publicKeyToken="26e0f1529304f4a7"                           culture="neutral" />         <bindingRedirect oldVersion="1.15.0.0-1.15.50.0"                          newVersion="1.15.50.0"/>       </dependentAssembly>      </assemblyBinding>   </runtime></configuration>
    
  2. Change the oldVersion attribute of the bindingRedirect element from the value "1.15.0.0-1.15.50.0" to the value "1.1.0.0-1.15.50.0" or another appropriate value.

  3. Save it as a policy.1.1.Sybase.Data.AseClient file.

  4. Enter the following to create a policy assembly from the policy file:

    al /link:policy.1.1.Sybase.Data.AseClient /out:policy.1.1.Sybase.Data.AseClient.dll /keyfile:aseclient.snk /version:1.15.9999.0 /company:"Sybase, Inc." /product:"Adaptive Server Enterprise" /description:"Adaptive Server Enterprise Managed Provider" 
    
  5. Add it to the GAC to start old applications that are using the new driver.