<fail>

[This is preliminary documentation and subject to change.]

Exits the current build by throwing a BuildException, optionally printing additional information.

The cause of the build failure can be specified using the message attribute or as inline content.

Macros in the message will be expanded.

Parameters

Attribute Type Description Required
message string A message giving further information on why the build exited. 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

Examples

Requirements

Assembly: NAnt.Core (0.86.3402.0)