Obsolete. Use the task instead.
The opposite of the
if
task.
Parameters
Attribute | Type | Description | Required |
---|---|---|---|
comparefile | string |
The file to check against for the uptodate file.
Obsolete. Use
|
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 |
propertyexists | string |
Used to test whether a property exists.
Obsolete. Use
|
False |
propertytrue | string |
Used to test whether a property is true.
Obsolete. Use
|
False |
targetexists | string |
Used to test whether a target exists.
Obsolete. Use
|
False |
test | string |
Used to test arbitrary boolean expression.
|
False |
unless | bool |
Opposite of
NAnt.Core.Task.IfDefined . If false
then the task will be executed; otherwise, skipped. The default is
false .
|
False |
uptodatefile | string |
The file to compare if uptodate.
Obsolete. Use
|
False |
verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
|
False |
Nested elements
<comparefiles>
The NAnt.Core.Types.FileSet
that contains the comparison files for
the NAnt.Core.Tasks.IfTask.UpToDateFile
(s) check.
</comparefiles>
<uptodatefiles>
The NAnt.Core.Types.FileSet
that contains the uptodate files for
the NAnt.Core.Tasks.IfTask.CompareFile
(s) check.
</uptodatefiles>
Examples
Check that a property does not exist.
<ifnot propertyexists="myProp">
<echo message="myProp does not exist."/>
</if>
Check that a property value is not true.
<ifnot propertytrue="myProp">
<echo message="myProp is not true."/>
</if>
Check that a target does not exist.
<ifnot targetexists="myTarget">
<echo message="myTarget does not exist."/>
</if>
Requirements
- Assembly
- NAnt
.Core .dll - Namespace
-
NAnt
.Core .Tasks