Team Build blogger: Aaron Hallberg
Aaron Hallberg, a developer working on Team Build, has taken the plunge and started a blog. Those of you who frequent the MSDN Team Build forum will probably recognize the name. You now have a blog to go with the name!
After getting post #1 out of the way, Aaron shows you how to insert custom build step from a custom task. The build steps are the messages that are displayed in the build report window. For example, you would want to insert a build step if your custom task takes a significant amount of time, so that the person running the build has some insight into what’s going on. Also, it can be useful to insert error messages as build steps if it’s an important error that you want to have higher visibility.
Team Build displays Build Steps in the build report form within Visual Studio. By default, build steps are added at various points during the course of a build – while getting sources (in the Get task), compiling solutions / projects, copying files to the drop location, etc. Team Build allows users to insert their own build steps using the publicly accessible BuildStore web service – in particular, the AddBuildStep and UpdateBuildStep methods. The following sample (I make no claims as to the awesomeness or lack thereof of this sample, etc.) TeamBuildTask class illustrates how this can be done.