Inside VSTS

New Features in Team Build 2008

One of the best benefits of Team System 2008 are the Team Build improvements -- including wizards, new test and scheduling options, and much more. Find out what they can do for you.

Many consider the release of Team System 2008 to be a "point" release, meaning little new functionality and a lot of fixes. This release, however, is more than that: The Team System team has released several pieces of new -- or at least very, very upgraded -- functionality that are very welcome. This article focuses on the new Team Build capabilities of Team System 2008, which has turned Team Build into a full-featured, robust build system.

The first and most obvious change is the new "wizard" for creating a team build (see Figure 1). Many of the improvements are embodied in this dialog. The Workspace tab allows you to pull source code from anywhere in TFS and gives Team Build its own workspace. You can also copy an existing workspace so you don't have to recreate everything from scratch. This option doesn't require any workarounds and solves the problem that developers had when trying to build across Team Projects.

There's also a new Retention Policy which lets you clean up the drop locations based on various conditions. In 2005, there was a frequent issue with the drop server running out of disk space, especially for teams using continuous integration. This is no longer an issue in 2008.

One the most requested features is the ability to run tests that aren't in a test list -- although you don't have as much control over which tests run. You can select an assembly that contains the tests you want to execute and all of the tests in the assembly will run against your code.

You can also specify build agents which execute the builds on different machines. While you could do this with TFS2005, you couldn't mark agents as enabled or disabled or configure the communications parameters with these agents. Now, you can.

In Figure 2, you can see the WithTests build and the NoTest build are running at the same time because they use different build agents on different servers. The tab at the bottom lets you switch between queued builds and completed builds. For completed builds, you can elect to delete them directly from Team System or you can lock them so they're retained indefinitely (and aren't cleaned up by the Retention Policy). You can also set the process priority if one build needs to run before other builds.

The biggest change, as shown in Figure 1, is the ability to schedule builds based on a variety of scenarios. "Build each check-in" is the Continuous Integration setting when you're dealing with smaller code bases. The "Accumulate check-ins" option triggers a build when the prior build has finished, and includes all of the check-ins up to when the build begins. This saves you from a massive backlog of builds that may not be kicked off until hours after your check in, which can be useful when the build takes a long time to execute or many developers are all doing check-ins at once. The last option is scheduled builds. Goodbye, Windows Scheduler! You can now do it all from within TFS.

Another nice change is the ability to edit a build by selecting "Edit Build Definition" in Team Explorer. Unlike 2005 which opened the raw XML file, this reopens the user interface and allows you to make changes (although you can and do still have to make changes to the actual TFSBuild.proj file, depending on your needs).

The last feature worth mentioning is the ability to put build projects anywhere you want to put them; they no longer have to be in the root of the team project. This can be a blessing and a curse, however. If you put the build on a code line and branch that code line (now you have two identical build definitions), only the original build definition will run as the build is linked to the TFSBuild.proj file. However, you can create a new Build Definition and point it to the branched TFSBuild.proj file. So branch the build files with caution and provide a naming procedure that helps identify the build and the branch that it's on!

With all of the new build features in TFS 2008, there should be no excuses not to use it. Automated builds help improve the quality of your code, let you pinpoint build errors more quickly and easily, and will help increase your confidence in your code.

About the Author

Jeff Levinson is the Application Lifecycle Management practice lead for Northwest Cadence specializing in process and methodology. He is the co-author of "Pro Visual Studio Team System with Database Professionals" (Apress 2007), the author of "Building Client/Server Applications with VB.NET" (Apress 2003) and has written numerous articles. He is an MCAD, MCSD, MCDBA, MCT and is a Team System MVP. He has a Masters in Software Engineering from Carnegie Mellon University and is a former Solutions Design and Integration Architect for The Boeing Company. You can reach him at [email protected].

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube