Reputation: 10969
I have tried adding <Message>
elements to tasks in a Visual Studio project file, in order to debug the build process. However, the elements have no effect on the text that is written to the Visual Studio output window.
Is there a way to write messages to the Visual Studio output window, by adding markup to the project being built?
Upvotes: 16
Views: 8615
Reputation: 3414
In your project properties → Build Events, you can add something like this in the Post-build event command line:
echo This is my message, no quotes required!
And then you'll be able to see it in the Output after a successful build (if configured to run on a successful build, which is my case).
Upvotes: 1
Reputation: 26863
This may 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.
Upvotes: 31
Reputation: 5830
I think this should work (it used to for me): <Message Text="blah" />
(And of course, from code, System.Diagnostics.Debug.WriteLine("blah");)
Upvotes: -1