[This is preliminary documentation and subject to change.]
Writes a message to the build log or a specified file.
For a list of all members of this type, see EchoTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.EchoTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The message can be specified using the Message attribute or as inline content.
Macros in the message will be expanded.
When writing to a file, the MessageLevel attribute is ignored.
Writes a message with level Debug to the build log.
<echo message="Hello, World!" level="Debug" />
Writes a message with expanded macro to the build log.
<echo message="Base build directory = ${nant.project.basedir}" />
Functionally equivalent to the previous example.
<echo>Base build directory = ${nant.project.basedir}</echo>
Writes the previous message to a file in the project directory, overwriting the file if it exists.
<echo file="buildmessage.txt">Base build directory = ${nant.project.basedir}</echo>
Namespace: NAnt.Core.Tasks
Assembly: NAnt.Core (in NAnt.Core.dll)
EchoTask Members | NAnt.Core.Tasks Namespace