Message Task
.NET Framework General Reference
Message Task

Logs a message during a build.

The folowing table describes the parameters of the Message task.

Parameter

Description

Importance

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.

Text

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 Overview of Logging in MSBuild.

The following code example logs messages to all registered loggers.

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="DisplayMessages">
        <Message Text="Project File Name = $(MSBuildProjectFile)" />
        <Message Text="Project Extension = $(MSBuildProjectExtension)" />
    </Target>
    ...
</Project>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
How to display messages in the default console logger.      Zhaph   |   Edit   |   Show History
We couldn't work out why Message wasn't outputting any text to the default build console log - the default settings in VS were for the MSBuild Project output verbosity of "Minimal".

Go to Tools | Options...
Expand the Projects and Solutions node, and select "Build and Run", and set the verbosity to "Normal", and all your messages will suddenly appear.
Tags What's this?: Add a tag
Flag as ContentBug
Processing
Page view tracker