tags:

views:

142

answers:

1

I need my custom team build task to write some output to the build log file. How do I do this?

The Execute method inherited from the Task baseclass only has a boolean as return parameter.

+1  A: 

Assuming you did the smart thing and inherited from Microsoft.Build.Utilities.Task, you can simply call Log.Log[Message|Warning|Error] to log with the appropriate level.

Alternately, you can use the BuildEngine you're given (in the ITask.BuildEngine property) to call the Log[X]Event methods.

technophile