Microsoft KB Archive/922320

= BUG: Error message when you try to install a Visual C++ assembly that is signed by using a CLR attribute in the global assembly cache: &quot;Failure adding assembly to the cache&quot; =

Article ID: 922320

Article Last Modified on 8/4/2006

-

APPLIES TO


 * Microsoft Visual Studio 2005 Express Edition
 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio 2005 Standard Edition
 * Microsoft Visual Studio 2005 Team System Architect Edition
 * Microsoft Visual Studio 2005 Team System Developer Edition
 * Microsoft Visual Studio 2005 Team Foundation
 * Microsoft Visual Studio 2005 Team System Test Edition

-





SYMPTOMS
Consider the following scenario. In Microsoft Visual Studio 2005, you create a Microsoft Visual C++ common language runtime (CLR) class library project. You use one or more of the CLR attributes to sign the assembly. For example, you use the AssemblyKeyFile CLR attribute. You try to install the assembly in the global assembly cache. In this scenario, you receive the following error message:

Failure adding assembly to the cache: Strong name signature could not be verified. Was the assembly built delay-signed?



CAUSE
This problem occurs because using CLR attributes to sign a Visual C++ assembly is not supported.



RESOLUTION
To resolve this problem, use Visual Studio 2005 linker options to sign Visual C++ assemblies. The following linker options control signing for Visual C++ assemblies:
 * /KEYFILE
 * /KEYCONTAINER
 * /DELAYSIGN

For more information about how to create a signed Visual C++ assembly, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms235305.aspx



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Keywords: kbtshoot kbbug KB922320

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.