Sometimes you may want calls to an older version of a component in the GAC to be diverted to a newer version of the component.

In order to do this, you need to create a policy redirect file and drop this into the GAC. The following must be done (the example is for an assembly named My.Assembly:

1. Create an XML file containing redirect information

  <?xml version="1.0" encoding="utf-8" ?>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <assemblyIdentity name="My.Assembly" publicKeyToken="17374ea5a1072ad8" />
          <bindingRedirect oldVersion="" newVersion="" />
          <bindingRedirect oldVersion="" newVersion="" />
          <bindingRedirect oldVersion="" newVersion="" />

In this example, the XML file is called “policy.1.0.My.Assembly.xml”.

2. Create the policy redirect DLL

Use the Assembly Linker tool to create the policy redirect dll:

al /link:policy.1.0.My.Assembly.xml /out:policy.1.0.My.Assembly.dll /keyfile:"C:\DevKeyFiles\sgKey.snk" /version:

3. Add redirect to the GAC

Step 2 should have created a dll file which can then be dragged and dropped in the GAC (usually located at C:\WinNT\assembly).