AssemblyOriginatorKeyFile Property

Visual Studio .NET 2003

Returns or sets the name of the file containing the originator key for signing a COM wrapper assembly. The originator key is the public part of the public/private cryptographic key pair required to form a strong name. This property is only meaningful in Visual C# projects.

Parameters

NewValue

A string specifying the path and file name of the file containing the originator key, relative to the project directory (see LocalPath Property).

Remarks

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.