NAnt SDK Documentation - v0.92

Project Class

Central representation of a NAnt project.

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

System.Object
   NAnt.Core.Project

[Visual Basic]
<Serializable, _  Serializable>
Public Class Project
[C#]
[Serializable]
[Serializable]
public class Project

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.

Example

The Run method will initialize the project with the build file specified in the constructor and execute the default target.

    
Project p = new Project("foo.build", Level.Info);
p.Run();
    
  

If no target is given, the default target will be executed if specified in the project.

    
Project p = new Project("foo.build", Level.Info);
p.Execute("build");
    
  

Requirements

Namespace: NAnt.Core

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

See Also

Project Members | NAnt.Core Namespace