NAnt SDK Documentation - v0.92 |

# RegAsmTask Class

Registers an assembly, or set of assemblies for use from COM clients.

For a list of all members of this type, see RegAsmTask Members.

System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.ExternalProgramBase
NAnt.Win32.Tasks.RegAsmTask

[Visual Basic]
<TaskName(Name:="regasm"), _ ProgramLocation(LocationType:=LocationType.FrameworkDir)>
Public Class RegAsmTask
Inherits ExternalProgramBase
[C#]
[TaskName(Name="regasm")]
[ProgramLocation(LocationType=LocationType.FrameworkDir)]
public class RegAsmTask : ExternalProgramBase

#### Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

#### Remarks

Refer to the Regasm documentation for more information on the regasm tool.

#### Example

Register types in a single assembly.

    <regasm assembly="myAssembly.dll" />

Register types of an assembly and generate a type library containing definitions of accessible types defined within the assembly.

    <regasm assembly="myAssembly.dll" typelib="myAssembly.tlb" />

Register types of set of assemblies at once, while specifying a set of reference assemblies.

    <regasm codebase="true">
        <assemblies>
            <include name="OutlookAddin.dll" />
            <include name="OfficeCoreAddin.dll" />
        </assemblies>
        <references>
            <include name="CommonTypes.dll" />
        </references>
    </regasm>

#### Requirements

Namespace: NAnt.Win32.Tasks

Assembly: NAnt.Win32Tasks (in NAnt.Win32Tasks.dll)

#### See Also

RegAsmTask Members | NAnt.Win32.Tasks Namespace