You may receive an error message that is misleading when you generate a delay-signed ActiveX wrapper in a Visual C# Windows application project in Visual Studio 2005 (919825)



The information in this article applies to:

  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
  • Microsoft Visual C# 2005, Express Edition

SYMPTOMS

Consider the following scenario. In Microsoft Visual Studio 2005, you create a Microsoft Visual C# Windows application project. In this project, you generate a delay-signed ActiveX wrapper by using the AxImporter class. In this scenario, you may receive an error message that resembles the following:
Failed to create the wrapper assembly for type library "AxMSFlexGridLib". Could not load file or assembly '65536 bytes loaded from System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) AxMSFlexGridLib TestWinFormsApp
This error message is misleading. This error message should state that the strong name validation failed for the Interop.MSFlexGridLib.dll file instead of for the System.Design namespace.

WORKAROUND

To work around this problem, disable assembly signing. To do this, follow these steps in the Visual C# Windows application project:
  1. Delete the ActiveX control that causes the problem.
  2. In Solution Explorer, right-click ProjectName, and then click Properties.
  3. Click Signing, and then click to clear the Sign the assembly check box.
  4. On the File menu, click Save All.
  5. Add the ActiveX control that you deleted in step 1.

STATUS

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

MORE INFORMATION

For more information about the AxImporter class, visit the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MinorLast Reviewed:9/5/2006
Keywords:kbinfo kbBug kbtshoot kbprb KB919825 kbAudDeveloper