MSDN Magazine - March 2009 - (Page 123) BRIAN A. RANDELL TEAM SYSTEM Team Build 2008 Customization In my November column on Team Foundation Team Explorer SKU Build (msdn.microsoft.com/magazine/dd150090), I disBuild or Equivalent Drop Site cussed what Team Build is, why you care, how Team Foundation Build to create a build, and how to use the new API to program the Team Build service. In this column, I’m goBuild Agent ing to cover how you can modify the default behavior Build Status Build Definition Files Reports MSBuild Scripts of Team Build, extend your builds with custom tasks, Start Build Team Build and make use of the enhancements added as part of Start Build Service Team Build SP. Before you start customizing your builds, however, Build Results Team Build Team Build it’s important to remember that Microsoft built Team Service Logger Build Complete Build on top of the Microsoft Build Engine (MSBuild), Source Control Get Sources and Scripts a core component of the Microsoft .NET Framework Team .. While I will provide some minor refresher points MSBuild Application Foundation Open and Update Bugs related to how MSBuild executes a build, you should Scripts Tier have a decent understanding to follow along. For a good review, you can read the June MSDN article on Data Tier Build Status for MSBuild at msdn.microsoft.com/magazine/cc163589. Reports As I’ve mentioned before, I encourage you to exWarehouse plore Team System customization, and in this case Team Build Team Build, in a nonproduction environment first. Store A good way, of course, is to use one of the Microsoftprovided evaluation virtual machines. I updated the images just before Christmas , so you’ll find fresh Figure 1 Overview of Build Components ones available with SP installed as well as other updates. The images are available for both Virtual PC and Hyper-V. If you create a build under Team Build , it stores much of You’ll find links and more details at pluralsight.com/community/blogs/brian/ the build data in a set of files under version control at a fixed locaarchive/2008/12/24/happy-holidays-and-look-what-santa-s-brought.aspx. tion. The most interesting of these files is TFSBuild.proj, an XML A number of moving parts are involved in executing a build. file that adheres to the MSBuild project file schema. When you Figure 1 (from the MSDN documentation at msdn.microsoft.com/li- create a build using Team Foundation Server , Team Build brary/ms181710.aspx) provides a pictorial view of all the pieces. In ad- stores most of the information you provide inside the TFS dition, I described the general steps of what occurs in my previous databases. However, you customize the build process the same way column. What we’re most concerned with here is when MSBuild regardless of version: you edit the TFSBuild.proj file and write cusgets involved. The Team Build service (TFSBuildService.exe) cre- tom MSBuild tasks (if necessary). ates an MSBuild process, passing the location of a file named TFSIn Team Build SP, you can access the TFSBuild.proj file by Build.tbrsp. You’ll find the file in the BuildType subfolder under right-clicking on a build definition’s name in the Team Explorer window your Build Agent’s working directory. and then selecting View Build Configuration. In versions prior to SP, The Team Build SP service generates TFSBuild.tbrsp dy- you open the Source Control Explorer and manually navigate to the namically. The file consists of data stored in the Team Build da- location you specified when running the build definition wizard. tabases, Team Build controlled parameters, and the contents (if any) of your build’s TFSBuild.rsp file. Figure 2 is an example of a Send your questions and comments for Brian to mmvsts@microsoft.com. test build I created. March 2009 123 http://msdn.microsoft.com/magazine/dd150090 http://msdn.microsoft.com/magazine/cc163589 http://www.pluralsight.com/community/blogs/brian/archive/2008/12/24/happy-holidays-and-look-what-santa-s-brought.aspx http://www.pluralsight.com/community/blogs/brian/archive/2008/12/24/happy-holidays-and-look-what-santa-s-brought.aspx http://msdn.microsoft.com/library/ms181710.aspx http://msdn.microsoft.com/library/ms181710.aspx
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.