<loadtasks>

Loads tasks form a given assembly or all assemblies in a given directory or NAnt.Core.Types.FileSet.

Parameters

Attribute Type Description Required
assembly file
An assembly to load tasks from.
False
path directory
A directory to scan for task assemblies.
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 NAnt.Core.Task.IfDefined. 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

<fileset>

Used to select which directories or individual assemblies to scan.

</fileset>

Examples

Load tasks from a single assembly.

<loadtasks assembly="c:foo\NAnt.Contrib.Tasks.dll" />

Scan a single directory for task assemblies.

<loadtasks path="c:\foo" />

Use a NAnt.Core.Tasks.LoadTasksTask.TaskFileSet containing both a directory and an assembly.

     <loadtasks>
    <fileset>
        <include name="C:\cvs\NAntContrib\build" />
        <include name="C:\cvs\NAntContrib\build\NAnt.Contrib.Tasks.dll" />
    </fileset>
</loadtasks>

Requirements

Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Tasks