<nant>

[This is preliminary documentation and subject to change.]

Runs NAnt on a supplied build file, or a set of build files.

By default, all the properties of the current project will be available in the new project. Alternatively, you can set inheritall to false to not copy any properties to the new project.

You can also set properties in the new project from the old project by using nested property tags. These properties are always passed to the new project regardless of the setting of inheritall. This allows you to parameterize your subprojects.

References to data types can also be passed to the new project, but by default they are not. If you set the inheritrefs to true, all references will be copied.

Parameters

Attribute Type Description Required
buildfile file The build file to build. False
inheritall bool Specifies whether current property values should be inherited by the executed project. The default is true. False
inheritrefs bool Specifies whether all references will be copied to the new project. The default is false. False
target string The target to execute. To specify more than one target seperate targets with a space. Targets are executed in order if possible. The default is to use target specified in the project's default attribute. False
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

Nested Elements:

<buildfiles>

Used to specify a set of build files to process.

</buildfiles>

<properties>

Specifies a collection of properties that should be created in the executed project. Note, existing properties with identical names that are not read-only will be overwritten.
<property>

Sets a property in the current project.

Note: NAnt uses a number of predefined properties.

Parameters

AttributeTypeDescriptionRequired
namestring The name of the NAnt property to set. True
valuestring The value to assign to the NAnt property.

This attribute's properties will not be automatically expanded!

True
dynamicbool Specifies whether references to other properties should not be expanded when the value of the property is set, but expanded when the property is actually used. By default, properties will be expanded when set. False
overwritebool Specifies whether the value of a property should be overwritten if the property already exists (unless the property is read-only). The default is true. False
readonlybool Specifies whether the property is read-only or not. The default is false. False
failonerrorbool Determines if task failure stops the build, or is just reported. The default is true. False
ifbool If true then the task will be executed; otherwise, skipped. The default is true. False
unlessbool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbosebool Determines whether the task should report detailed build log messages. The default is false. False

Examples

</property>

</properties>

Examples

Requirements

Assembly: NAnt.Core (0.91.3951.0)