You receive an error message when you add a reference to a COM object in Visual Studio .NET after you install Windows XP Service Pack 2 (883608)



The information in this article applies to:

  • Microsoft Windows XP Professional Service Pack 2 (SP2)
  • Microsoft Windows XP Home Edition Service Pack 2 (SP2)
  • Microsoft Windows XP Media Center Edition Service Pack 2 (SP2)
  • Microsoft Windows XP Tablet PC Edition 2005
  • Microsoft Visual Studio .NET (2002), Academic Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition SP1
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition SP1
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition SP1
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition

SYMPTOMS

On a computer that is running Microsoft Windows XP Service Pack 2 (SP2), when you add a reference to a COM object in Microsoft Visual Studio .NET, you may receive an error message that is similar to the following:
A reference to 'COMObject' could not be added.

The type library wrapper tool 'tlbimp' cannot be found on this system. Please re-install Visual Studio.

CAUSE

This issue may occur if the following conditions are true:
  • Your computer is configured to use one of the new locales that are included in Windows XP SP2.
  • The version of the Microsoft .NET Framework that you are running does not support the locale that your computer is configured to use.
In this situation, you receive the error message that is mentioned in the "Symptoms" section when the .NET Framework tries to create a CultureInfo object for the locale. The versions of the .NET Framework that do not support the new locales that are included in Windows XP SP2 are listed as follows:
  • .NET Framework 1.1
  • .NET Framework 1.0 Service Pack 2 (SP2)
  • .NET Framework 1.0 Service Pack 1 (SP1)
  • .NET Framework 1.0

WORKAROUND

To work around this issue, install a version of .NET Framework that supports culture fallback. The versions of the .NET Framework that support culture fallback include the following:
  • .NET Framework 1.0 Service Pack 3 (SP3) and later
  • .NET Framework 1.1 Service Pack 1 (SP1) and later
After you install a version of the .NET Framework that supports culture fallback, you can configure your computer to use a locale that is not supported in the .NET Framework. If you do this, and if you use the default setting for the current culture in managed code, the CultureInfo object is created based on user settings and locales that are available in the .NET Framework. The fallback order is listed as follows:
  • The default LCID of the system, as specified by the GetSystemDefaultLCID function.
  • The lLanguage of the user interface of the system, as specified by the GetSystemDefaultUILanguage function.
  • The invariant culture.

MORE INFORMATION

For additional information about the new locales that are supported in Windows XP SP2, click the following article number to view the article in the Microsoft Knowledge Base:

883262 New locales supported in Windows XP Service Pack 2


Modification Type:MinorLast Reviewed:5/23/2005
Keywords:kbAppCompatibility kberrmsg kbtshoot KB883608 kbAudITPRO kbAudEndUser kbAudDeveloper