Speeding up Team Builds

If you're testing a complex new team build, you may find yourself going through a lot of build cycles. This can be painful, because most complex builds also take a while to complete.

To speed up the build process, you can skip some parts of it. You can do this in one of two places. First, in the TFSBuild.proj, you can insert these elements in the PropertyGroup:

<!-- insert in PropertyGroup -->
<SkipClean>true</SkipClean>
<SkipInitializeWorkspace>true</SkipInitializeWorkspace>
<ForceGet>false</ForceGet>
<SkipWorkItemCreation>true</SkipWorkItemCreation>
<SkipLabel>true</SkipLabel>
<SkipPostBuild>true</SkipPostBuild>

Alternately, you can edit the TFSBuild.rsp file to achieve the same results:

# This is a response file for MSBuild
# Add custom MSBuild command line options in this file
/p:SkipClean=true;SkipInitializeWorkspace=true;
ForceGet=false;SkipWorkItemCreation=true;
SkipLabel=true;SkipPostBuild=true 

(Note the above should all be on a single line; I broke it up for ease of display.) What are we skipping here? Well, we skip...

  • .. deleting the source code folder
  • .. doing a "force get" of the source code, so we use the code that's already present on disk
  • .. labelling after completing the build
  • .. compiling a list of work items that changed in the build
  • .. creating a work item when the build fails

But despite all the skipping, the essential part of the build still completes. And that's usually what we're trying to troubleshoot.

(thanks to Dave McKinstry and Omar Villarreal for these tips!)

posted on Monday, February 12, 2007 3:01 PM by jatwood

Comments

# re: Speeding up Team Builds

We use this (and a little bit more) to do continuous incremental builds. It starts to break when you delete a visual studio project from source control. The build process does a "tf get", tries to delete the directory the project lived in and stumbles, because it is not empty. There are some left overs from the last build (i.e. obj\debug).
The only solution I have found: Do a "tf get" yourself and ignore the exit code.
Messy, isn't it?
ralf
Tuesday, February 13, 2007 2:28 AM by Ralf Kretzschmar

# VSTS Links - 02/14/2007

Adam Singer on Grep'ing Groups.

Brian Harry on Managing Quality (part 4) - Stress Testing.

AngelaB...
Wednesday, February 14, 2007 6:49 AM by Team System News