MSBuild: display a message that appears in the Error List window in VisualStudio

Visual Studio has an Error List window:

Visual Studio Error list window

In the msbuild task (in the .csproj file):

  • When I use the <error text="Foo"> , I get an error message in the error list (and I can hide it without changing the error in this window).
  • When I use the <warning text="Bar"> , I get a warning in the error list (and I can hide it without changing the warning in this window).
  • When I use the <message text="Baz"> , I don’t see anything in the error list window . If I go to the output window, I see a message there (even if I turn messages on or off).

How can I create messages from the MSBuild script that appear in the Visual Studio Error List window?

Note. I am using Visual Studio 2010.

+6
source share

All Articles