How do I write output to the console from a custom MSBuild task?

.net, msbuild

Solution

The base Task class has a `Log` property you can use:

Log.LogMessage("My message");

Problem

I'm trying to debug an MSBuild task, and I know there is some way to write to the MSBuild log from within a custom task but I forget how.

Original source