BUG: Smart Tag DLL That Is Created in Visual Studio .NET 2003 Does Not Load in Office XP (824016)



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Excel 2002
  • Microsoft Word 2002

SYMPTOMS

When you build a Smart Tag DLL in Microsoft Visual Studio .NET 2003, the Smart Tag DLL does not load in Microsoft Office XP.

CAUSE

When you build a managed Smart Tag DLL in Visual Studio .NET, the Smart Tag DLL is registered for COM Interop. The Smart Tag DLL is registered at the following registry location:

HKEY_CLASSES_ROOT\CLSID\<Class ID>\InprocServer32

The <Class ID> is the Class ID of the Smart Tag Action class or the Smart Tag Recognizer class.

The Microsoft .NET Framework 1.0 sets the default value of this key to the location of Mscoree.dll. The location of Mscoree.dll includes the path. By default, this location is %SYSTEM32%\Mscoree.dll.

The .NET Framework 1.1 sets the default value of this key to Mscoree.dll without the path information. Because the registry value does not contain the path information, the Smart Tag DLL does not load when Office XP loads the Smart Tags.

RESOLUTION

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

To work around this problem, follow these steps:
  1. Click Start, and then click Run.
  2. In the Open box, type regedit, and then click OK.
  3. In Registry Editor, locate the following key, and then click the following key:

    HKEY_CLASSES_ROOT\CLSID\<Class ID>\InprocServer32

    The <Class ID> is the Class ID of the Smart Tag Action class.
  4. Click Default, and then change the default value from Mscoree.dll to C:\WINDOWS\System32\mscoree.dll for Windows XP operating systems or to C:\WINNT\System32\mscoree.dll for Microsoft Windows 2000 operating systems.
  5. Repeat step 3 and step 4 for the Smart Tag Recognizer class.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.

This bug was corrected in Microsoft Office 2003.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Start Visual Studio .NET 2003.
  2. Create an Office XP Smart Tag in Visual Studio .NET 2003.

    For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

    306058 HOW TO: Create an Office XP Smart Tag DLL by Using Visual Basic .NET

    306422 HOW TO: Create an Office XP Smart Tag DLL by Using Visual C# .NET

  3. Start Microsoft Word or Microsoft Excel.

    Notice that the Smart Tag DLL does not load.

Modification Type:MinorLast Reviewed:9/27/2006
Keywords:kbBug kbInprocSvr KB824016 kbAudDeveloper