Summary
- Assembly
- NAnt.Core .dll 
- Namespace
- NAnt.Core .Tasks 
- Interfaces
- Base Types
Syntax
[TaskName("echo")]
public class EchoTask : Task, IConditionalExamples
      Writes a message with level NAnt.Core.Level.Debug to the build log.
      
<echo message="Hello, World!" level="Debug" />Writes a two-line message to the build log using inline content.
    <echo>First line
Second line</echo>
      Writes a two-line message to the build log using the NAnt.Core.Tasks.EchoTask.Message attribute.
      
    <echo message='First line
Second line</echo>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>Remarks
      The message can be specified using the NAnt.Core.Tasks.EchoTask.Message attribute
      or as inline content. If neither is included - or the message contains
      only whitespace - then an empty message will be emitted in the output.
      
Macros in the message will be expanded.
      When writing to a file, the NAnt.Core.Tasks.EchoTask.MessageLevel attribute is
      ignored.
      
Attributes
| Type | Description | 
|---|---|
| TaskNameAttribute | Indicates that class should be treated as a task. | 
Properties
| Name | Value | Summary | 
|---|---|---|
| Append | bool | 
    Determines whether the  NAnt.Core.Tasks.EchoTaskshould append to the 
    file, or overwrite it.  By default, the file will be overwritten. | 
| Contents | string | 
    Gets or sets the inline content that should be output.
     | 
| CustomXmlProcessing | bool | 
    Gets a value indicating whether the element is performing additional
    processing using the  NAnt.Core.Element.XmlNodethat was used to 
    initialize the element.Inherited from Element | 
| Encoding | Encoding | 
    The encoding to use when writing message to a file. The default is
    UTF-8 encoding without a Byte Order Mark (BOM).
     | 
| FailOnError | bool | 
    Determines if task failure stops the build, or is just reported. 
    The default is  true.Inherited from Task | 
| File | FileInfo | 
    The file to write the message to.
     | 
| IfDefined | bool | 
    If  truethen the task will be executed; otherwise, 
    skipped. The default istrue.Inherited from Task | 
| Location | Location | 
    Gets or sets the location in the build file where the element is 
    defined.
     Inherited from Element | 
| LogPrefix | string | 
    The prefix used when sending messages to the log.
     Inherited from Task | 
| Message | string | 
    The message to output.
     | 
| MessageLevel | Level | 
    The logging level with which the message should be output. The default 
    is  NAnt.Core.Level.Info. | 
| Name | string | 
    The name of the task.
     Inherited from Task | 
| NamespaceManager | XmlNamespaceManager | 
    Gets or sets the  System.Xml.XmlNamespaceManager.Inherited from Element | 
| Parent | Object | 
    Gets or sets the parent of the element.
     Inherited from Element | 
| Project | Project | 
    Gets or sets the  NAnt.Core.Element.Projectto which this element belongs.Inherited from Element | 
| Properties | PropertyDictionary | 
    Gets the properties local to this  NAnt.Core.Elementand theNAnt.Core.Element.Project.Inherited from Element | 
| Threshold | Level | 
    Gets or sets the log threshold for this  NAnt.Core.Task. By
    default the threshold of a task isNAnt.Core.Level.Debug,
    causing no messages to be filtered in the task itself.Inherited from Task | 
| UnlessDefined | bool | 
    Opposite of  NAnt.Core.Task.IfDefined. Iffalsethen the task will be executed; otherwise, skipped. The default isfalse.Inherited from Task | 
| Verbose | bool | 
    Determines whether the task should report detailed build log messages. 
    The default is  false.Inherited from Task | 
| XmlNode | XmlNode | 
    Gets or sets the XML node of the element.
     Inherited from Element | 
Methods
| Name | Value | Summary | 
|---|---|---|
| CopyTo | void | 
    Copies all instance data of the  NAnt.Core.Elementto a givenNAnt.Core.Element.Inherited from Element | 
| Execute | void | 
    Executes the task unless it is skipped.
     Inherited from Task | 
| ExecuteTask | void | 
    Outputs the message to the build log or the specified file.
     | 
| Get | XmlNode | 
    Locates the XML node for the specified attribute in either the
    configuration section of the extension assembly or the.project.
     Inherited from Task | 
| Get | XmlNode | Inherited from Element | 
| GetLocation | Location | 
    Retrieves the location in the build file where the element is 
    defined.
     Inherited from Element | 
| Initialize | void | 
    Initializes the task.
     | 
| Initialize | void | 
    Performs default initialization.
     Inherited from Element | 
| Initialize | Element | 
    Initializes the build element.
     Inherited from Element static | 
| InitializeElement | void | 
    Derived classes should override to this method to provide extra 
    initialization and validation not covered by the base class.
     Inherited from Element | 
| InitializeTask | void | Initializes the task. Inherited from Task | 
| Initialize | void | 
    Initializes the configuration of the task using configuration 
    settings retrieved from the NAnt configuration file.
     Inherited from Task | 
| InitializeXml | void | 
    Initializes all build attributes and child elements.
     Inherited from Element | 
| IsLogEnabledFor | bool | 
    Determines whether build output is enabled for the given 
     NAnt.Core.Level.Inherited from Task | 
| Log | void | 
    Logs a message with the given priority.
     Inherited from Task | 
| Log | void | 
    Logs a formatted message with the given priority.
     Inherited from Task | 
