Better integrating other build tools into your build

Buck Hodges

Aaron Hallberg wrote a great post today showing how to use a custom task to better integrate other build tools, such as devenv (aka Visual Studio), as part of your build in Team Build.

Building Non-MSBuild Projects With Team Build

Building non-MSBuild projects in Team Build has never been a particularly nice experience…  You can make it work, typically by invoking DevEnv or some other tool using an Exec task, but you don’t get any output in your build report or build log, etc.  Additionally, it was recently pointed out to me (by D. Omar Villareal from Notion Solutions) that when a build type is set up that only builds non-MSBuild projects, the resulting builds don’t end up in default Build Reports generated by TFS, since the relevant information doesn’t get generated for the Warehouse!

To solve some of these issues, I’ve put together a custom MSBuild task for compiling non-MSBuild projects in Team Build.  The basic idea here is to execute an external executable (like the Exec task does), redirect stdout and stderr to the build log, and insert some minimal data into the Team Build database.  I had it inherit from the task base class I put together way back in August of last year.  As always, no guarantees are made about the awesomeness, or lack thereof, of this sample code.

more…

If you decide that you want to have this show up as a separate build step, you can the calls to AddBuildStep() followed by UpdateBuildStep() as he showed in an earlier post.

tags: , , , , ,

0 comments

Leave a comment

Feedback usabilla icon