Sets a property in the current project.
For a list of all members of this type, see PropertyTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.PropertyTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Note NAnt uses a number of predefined properties.
Define a debug
property with value true.
<property name="debug" value="true" />
Use the user-defined debug
property.
<property name="trace" value="${debug}" />
Define a read-only property. This is just like passing in the param on the command line.
<property name="do_not_touch_ME" value="hammer" readonly="true" />
Define a property, but do not overwrite the value if the property already exists (eg. it was specified on the command line).
<project name="property-example"> <property name="debug" value="true" overwrite="false" /> <echo message="debug: ${debug}" /> </project>
Executing this build file with the command line option -D:debug=false
, would cause the value specified on the command line to remain unaltered.
[echo] debug: false
Namespace: NAnt.Core.Tasks
Assembly: NAnt.Core (in NAnt.Core.dll)
PropertyTask Members | NAnt.Core.Tasks Namespace