Freigeben über


ResolveComReference Task

Takes a list of one or more type library names or .tlb files and resolves those type libraries to locations on disk.

Parameters

The following table describes the parameters of the ResolveCOMReference task.

Parameter Description

DelaySign

Optional Boolean parameter.

If true, places the public key in the assembly. If false, fully signs the assembly.

KeyContainer

Optional String parameter.

Specifies a container that holds a key pair.

KeyFile

Optional String parameter.

Specifies an item that contains a key pair.

NoClassMembers

Optional Boolean parameter.

ResolvedAssemblyReferences

Optional ITaskItem[] output parameter.

Specifies the resolved assembly references.

ResolvedFiles

Optional ITaskItem[] output parameter.

Specifies the fully qualified files on disk that correspond to the physical locations of the type libraries that were provided as input to this task.

ResolvedModules

Optional ITaskItem[] parameter.

TypeLibFiles

Optional ITaskItem[] parameter.

Specifies the type library file path to COM references. Items included in this parameter may contain item metadata. For more information, see the section "TypeLibFiles Item Metadata" below.

TypeLibNames

Optional ITaskItem[] parameter.

Specifies the type library names to resolve. Items included in this parameter must contain some item metadata. For more information, see the section "TypeLibNames Item Metadata" below.

WrapperOutputDirectory

Optional String parameter.

The location on disk where the generated interop assembly is placed. If this item metadata is not specified, the task uses the absolute path of the directory where the project file is located.

Remarks

TypeLibNames Item Metadata

The following table describes the item metadata available for items passed to the TypeLibNames parameter.

Metadata Description

GUID

Required item metadata.

The GUID for the type library. If this item metadata is not specified , the task fails.

VersionMajor

Required item metadata.

The major version of the type library. If this item metadata is not specified , the task fails.

VersionMinor

Required item metadata.

The minor version of the type library. If this item metadata is not specified, the task fails.

LocaleIdentifier

Optional item metadata.

The Locale Identifier (or LCID) for the type library. This is specified as a 32-bit value that identifies the human language preferred by a user, region, or application. If this item metadata is not specified, the task uses a default locale identifier of "0".

WrapperTool

Optional item metadata.

Specifies the wrapper tool that is used to generate the assembly wrapper for this type library. If this item metadata is not specified, the task uses a default wrapper tool of "tlbimp". The available, case insensitive choices of typelibs are:

  • Primary: Use this wrapper tool when you want to use an already generated primary interop assembly for the COM component. When you use this wrapper tool, do not specify a wrapper output directory because that will cause the task to fail.

  • TLBImp: Use this wrapper tool when you want to generate an interop assembly for the COM component.

  • AXImp:Use this wrapper tool when you want to generate an interop assembly for an ActiveX component.

TypeLibFiles Item Metadata

The following table describes the item metadata available for items passed to the TypeLibFiles parameter.

Metadata Description

WrapperTool

Optional item metadata.

Specifies the wrapper tool that is used to generate the assembly wrapper for this type library. If this item metadata is not specified, the task uses a default wrapper tool of "tlbimp". The available, case insensitive choices of typelibs are:

  • Primary: Use this wrapper tool when you want to use an already generated primary interop assembly for the COM component. When you use this wrapper tool, do not specify a wrapper output directory because that will cause the task to fail.

  • TLBImp: Use this wrapper tool when you want to generate an interop assembly for the COM component.

  • AXImp: Use this wrapper tool when you want to generate an interop assembly for an ActiveX component.

NoteNote

The more information that you provide to uniquely identify a type library, the greater the possibility that the task will resolve to the correct file on disk.

See Also

Concepts

MSBuild Tasks

Other Resources

MSBuild Task Reference