views:

150

answers:

2

I have tried adding <Message> elements to tasks in a VS project file, in order to debug the build process. However, the elements have no effect on the text that is written to the VS output window.

Is there a way to write messages to the VS output window, by adding markup to the project being built?

+2  A: 

Maybe this can help?

Under Tools – Options – Projects and Solutions – Build and Run, there’s the MSBuild project build output verbosity combo box. This controls how much info you want to see in the Output window.

Nikola Smiljanić
Thanks, that did it.Even with Importance="high", Messages don't get written out to the Output window by default.
mackenir
A: 

I think this should work (it used to for me): <Message Text="blah" />

(And of course, from code, System.Diagnostics.Debug.WriteLine("blah");)

Ariel
Debug.WriteLine() outputs to the debug console at *run-time*
Serge - appTranslator
That's why I put "from code" above, right?Even more, nothing prevents you from writing a custom msbuild extension and use System.Diagnostics.Debug.WriteLine(), right?
Ariel