This documentation is archived and is not being maintained.

AssemblyKeyContainerName Property

Visual Studio .NET 2003

Returns or sets the name of the key container that contains the public and private key pair required for signing a COM wrapper assembly. This property is only meaningful in Visual C# projects.

[Visual Basic .NET]
Public Property AssemblyKeyContainerName() As String
[Visual Basic 6]
Property Get AssemblyKeyContainerName() As String
Property Let AssemblyKeyContainerName( _
   ByVal ContainerName As String _
HRESULT __stdcall get_AssemblyKeyContainerName(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_AssemblyKeyContainerName(
   /* [in] */ BSTR ContainerName
string AssemblyKeyContainerName {get; set;}
[JScript .NET]
public function get AssemblyKeyContainerName() : String
public function set AssemblyKeyContainerName(
   ContainerName: String


The name of the key container. The container name is created when the Strong Name Tool (sn.exe) is run.


A strong name consists of the assembly's identity — its simple text name, version number, and culture information (if provided) — plus a public key and a digital signature. The public/private key pair, used to create the digital signature, may be stored in a file or in a container in the Cryptographic Service Provider (CSP). The Strong Name Tool (Sn.exe) creates the file or container. The file name is specified by the user when running the tool and that same name is used in this property. For more information, see Strong-Named Assemblies.

A cryptographic service provider is an independent software module that performs cryptography algorithms for authentication, encoding, and encryption. For more information, see Microsoft Cryptographic Service Providers.

If your project creates a COM wrapper assembly, you can use the AssemblyOriginatorKeyFile, AssemblyKeyContainerName, and DelaySign properties to sign the assembly. If both the AssemblyOriginatorKeyFile property and AssemblyKeyContainerName property exist, and the container name is found in the CSP, then the assembly is signed using the container. Otherwise, the key file is used to sign the assembly.

The project system will automatically generate COM wrapper assemblies if your project contains references to COM components. For more information, see COM Interop Wrapper Error.

For information on signing the main assembly, see Global Attributes (Visual C#) and Global Attributes (Visual Basic).


See AssemblyOriginatorKeyFile Property.

See Also

AssemblyOriginatorKeyFile Property | Assembly Manifest | Strong Name Tool (Sn.exe) | Signing an Assembly with a Strong Name | General, Common Properties, <Projectname> Property Pages Dialog Box

Applies To: Properties Property (General Extensibility) | Properties Property (Visual Basic and Visual C# Project Object)