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!)