COMRegisterTask Class

Summary

Register COM servers or type libraries.
Assembly
NAnt.Contrib.dll
Namespace
NAnt.Contrib.Tasks
Base Types
  • Task
graph BT Type-->Base0["Task"] Type["COMRegisterTask"] class Type type-node

Syntax

[TaskName("comregister")]
public class COMRegisterTask : Task

Examples

Register a single dll server.

<comregister file="myComServer.dll" />

Register a single exe server

<comregister file="myComServer.exe" />

Register a set of COM files at once.

    <comregister unregister="false">
    <fileset>
        <include name="an_ExeServer.exe" />
        <include name="a_TypeLibrary.tlb" />
        <include name="a_DllServer.dll" />
        <include name="an_OcxServer.ocx" />
    </fileset>
</comregister>

Remarks

COM register task will try and register any type of COM related file that needs registering.

Executable files (.exe) will be registered as exe servers, type libaries (.tlb) registered with RegisterTypeLib and for all other filetypes it will attempt to register them as dll servers.

Attributes

Type Description
TaskName

Properties

Name Value Summary
COMRegisterFileSet FileSet
The set of files to register.
File FileInfo
The name of the file to register. This is provided as an alternate to using the task's fileset.
Unregister bool
Unregistering this time. ( /u paramater )Default is "false".

Methods