The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Message Task

Logs a message during a build.

The folowing table describes the parameters of the Message task.

Parameter Description


Optional String parameter.

Specifies the importance of the message. This parameter can have a value of high, normal or low. The default value is normal.


Optional String parameter.

The error text to log.

The Message task allows MSBuild projects to issue messages to loggers at different steps in the build process.

If the Condition parameter evaluates to true, the value of the Text parameter will be logged and the build will continue to execute. If a Condition parameter does not exist, the message text is logged. For more information on logging, see MSBuild Logging.

The following code example logs messages to all registered loggers.

<Project xmlns="">
    <Target Name="DisplayMessages">
        <Message Text="Project File Name = $(MSBuildProjectFile)" />
        <Message Text="Project Extension = $(MSBuildProjectExtension)" />
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft