Compartilhar via


/contêiner de chave

Specifies a key container name for a key pair to give an assembly a strong name.

/keycontainer:container

Arguments

Term

Definition

container

Required. Container file that contains the key. Enclose the file name in quotation marks ("") if the name contains a space.

Comentários

The compiler creates the sharable component by inserting a public key into the assembly manifest and by signing the final assembly with the private key. Para gerar um arquivo de chave , digite sn -k file na linha de comando. The -i option installs the key pair into a container. For more information, see Sn. exe (ferramenta de nome forte).

If you compile with /target:module, the name of the key file is held in the module and incorporated into the assembly that is created when you compile an assembly with /addmodule.

You can also specify this option as a custom attribute (AssemblyKeyNameAttribute) in the source code for any Microsoft intermediate language (MSIL) module.

You can also pass your encryption information to the compiler with /keyfile. Use /delaysign if you want a partially signed assembly.

See Criando e usando Assemblies de Nome Forte for more information on signing an assembly.

ObservaçãoObservação

The /keycontainer option is not available from within the Visual Studio development environment; it is available only when compiling from the command line.

Exemplo

The following code compiles source file Input.vb and specifies a key container.

vbc /keycontainer:key1 input.vb

Consulte também

Referência

/keyfile

Exemplos de Linhas de Comando de Compilação (Visual Basic)

Conceitos

Assemblies e o Cache de Assembly Global (C# e Visual Basic)

Outros recursos

Compilador do Visual Basic