NAnt SDK Documentation - v0.92

IncludeTask Class

Includes an external build file.

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

System.Object
   NAnt.Core.Element
      NAnt.Core.Task
         NAnt.Core.Tasks.IncludeTask

[Visual Basic]
<TaskName(Name:="include")>
Public Class IncludeTask
    Inherits Task
[C#]
[TaskName(Name="include")]
public class IncludeTask : Task

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 task is used to break your build file into smaller chunks. You can load a partial build file and have it included into the build file.

Note    Any global (project level) tasks in the included build file are executed when this task is executed. Tasks in target elements are only executed if that target is executed.
Note    The project element attributes are ignored.
Note    This task can only be in the global (project level) section of the build file.
Note    This task can only include files from the file system.

Example

Include a task that fetches the project version from the GetProjectVersion.include build file.

    
<include buildfile="GetProjectVersion.include" />
    
  

Requirements

Namespace: NAnt.Core.Tasks

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

See Also

IncludeTask Members | NAnt.Core.Tasks Namespace