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

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)AxMSFlexGridLibTestWinFormsApp
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:
Propriedades

ID do Artigo: 919825 - Última Revisão: 11 de jul de 2008 - Revisão: 1

Comentários