NAnt SDK Documentation - v0.92

RegsvcsTask Class

Installs or removes .NET Services.

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

System.Object
   NAnt.Core.Element
      NAnt.Core.Task
         NAnt.Core.Tasks.ExternalProgramBase
            NAnt.DotNet.Tasks.RegsvcsTask

[Visual Basic]
<ProgramLocation(LocationType:=LocationType.FrameworkDir), _  TaskName(Name:="regsvcs")>
Public Class RegsvcsTask
    Inherits ExternalProgramBase
[C#]
[ProgramLocation(LocationType=LocationType.FrameworkDir)]
[TaskName(Name="regsvcs")]
public class RegsvcsTask : 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

This tasks provides the same functionality as the regsvcs tool provided in the .NET SDK.

It performs the following actions:

Refer to the .NET Services Installation Tool (Regsvcs.exe) for more information.

Example

Adds all public classes contained in myTest.dll to a COM+ application and produces the myTest.tlb type library. If the application already exists, it is overwritten.

    
<regsvcs action="FindOrCreate" assembly="myTest.dll" />
    
  

Adds all public classes contained in myTest.dll to myTargetApp and produces the myTest.tlb type library. If the application already exists, it is overwritten.

    
<regsvcs action="FindOrCreate" assembly="myTest.dll" application="myTargetApp" />
    
  

Adds all public classes contained in myTest.dll to a COM+ application and produces the myTest.tlb type library. A new application is always created.

    
<regsvcs action="Create" assembly="myTest.dll" />
    
  

Uninstalls the COM+ application contained in myTest.dll.

    
<regsvcs action="Uninstall" assembly="myTest.dll" />
    
  

Requirements

Namespace: NAnt.DotNet.Tasks

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

See Also

RegsvcsTask Members | NAnt.DotNet.Tasks Namespace