Fix for Office 2013 Publisher PIA

So, Office 2013 is out, and out of the box there is an unpleasant surprise: our code driving Publisher via the interop assembly no longer compiles. After much digging, turns out Microsoft managed to screw up the registry entry for the Publisher PIA.

Here's the fix, step by step:

  1. Fire up regedit (usual caveats apply, don't blame me if your computer blows up)
  2. Run a search for "0002123C-0000-0000-C000-000000000046" (without quotes)
  3. The first hit should be HKEY_CLASSES_ROOT\Typelib\{0002123C-0000-0000-C000-000000000046}
  4. Expand the key, observe two subkeys, "2.1" and "2.2" -- you've found the problem!
  5. Note how the 2.1 key has a "PrimaryInteropAssemblyName" string value, and the 2.2 key does not? Well, that value belongs in 2.2 and 2.1 should not be there at all, so let's make it so:
  6. Create a new string value inside the 2.2 key, named "PrimaryInteropAssemblyName" with value set to "Microsoft.Office.Interop.Publisher, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"
  7. Delete the 2.1 key
  8. Voila!

Your Visual Studio reference to the Publisher interop assembly should now be happy again.

posted @ Tuesday, November 27, 2012 1:05 AM

Print
Comments have been closed on this topic.