Editare

Partajați prin


GenerateMetadata.GenerateMetaData Method

Definition

Generates, or locates, an assembly that contains common language runtime (CLR) metadata for a COM+ component represented by the specified type library, signs the assembly with a strong-named key pair, and installs it in the global assembly cache.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 System::String ^ GenerateMetaData(System::String ^ strSrcTypeLib, System::String ^ outPath, cli::array <System::Byte> ^ PublicKey, System::Reflection::StrongNameKeyPair ^ KeyPair);
public string GenerateMetaData (string strSrcTypeLib, string outPath, byte[] PublicKey, System.Reflection.StrongNameKeyPair KeyPair);
member this.GenerateMetaData : string * string * byte[] * System.Reflection.StrongNameKeyPair -> string
Public Function GenerateMetaData (strSrcTypeLib As String, outPath As String, PublicKey As Byte(), KeyPair As StrongNameKeyPair) As String

Parameters

strSrcTypeLib
String

The name of the type library for which to generate an assembly.

outPath
String

The folder in which to generate an assembly or to locate an already existing assembly.

PublicKey
Byte[]

A public key used to import type library information into an assembly.

KeyPair
StrongNameKeyPair

A strong-named key pair used to sign the generated assembly.

Returns

The generated assembly name; otherwise, an empty string if the inputs are invalid.

Remarks

If necessary, the GenerateMetaData method generates an assembly that contains CLR metadata for a specified type library. It does not generate an assembly if an assembly of the generated name already exists in the string outPath folder.

GenerateMetaData does not need to be called directly from your code. It is called by both the Generate and GenerateSigned methods.

If called by GenerateSigned, GenerateMetaData also generates a strong-named key pair, signs the assembly, and installs it in the global assembly cache.

Applies to