# <include>

Includes an external build file.

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.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
buildfile | string | Build file to include. | True
failonerror | bool | Determines if task failure stops the build, or is just reported. The default is true. | False
if | bool | If true then the task will be executed; otherwise, skipped. The default is true. | False
unless | bool | Opposite of `if`. If false then the task will be executed; otherwise, skipped. The default is false. | False
verbose | bool | Determines whether the task should report detailed build log messages. The default is false. | False

### Examples

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

                  <include buildfile="GetProjectVersion.include" />

### Requirements

Assembly: NAnt.Core (0.90.3780.0)