For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Reads the metadata within the specified assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently. The behavior of this task is similar, but not identical, to that of the Regasm.exe (Assembly Registration Tool).
The following table describes the parameters of the
Specifies the assemblies to be registered with COM.
|Optional ITaskItem parameter.|
Contains information about the state between the
Specifies the type library to generate from the specified assembly. The generated type library contains definitions of the accessible types defined within the assembly. The type library is only generated if one of the following is true:
- A type library of that name does not exist at that location.
- A type library exists but it is older than the assembly being passed in.
If the type library is newer than the assembly being passed, a new one will not be created, but the assembly will still be registered.
If this parameter is specified, it must have the same number of items as the
In addition to the parameters listed above, this task inherits parameters from the TaskExtension class, which itself inherits from the Task class. For a list of these additional parameters and their descriptions, see TaskExtension Base Class.
The following example uses the
RegisterAssembly task to register the assembly specified by the
MyAssemblies item collection.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <MyAssemblies Include="MyAssembly.dll" /> <ItemGroup> <Target Name="RegisterAssemblies"> <RegisterAssembly Assemblies="@(MyAssemblies)" > </Target> </Project>