tags:

views:

44

answers:

2

When I build one of our projects in TFS 2008 it takes about 30 minutes to build a small project. When I looked at the buildlog text I noticed that it is executing the following task which is getting all branches of our TFS repository (DEV,MAIN, PROD, TEST) and downloading the source before it builds. Is there a way to only get the dependencies needed to build instead of downloading our whole library of sourcecode for each project?

BuildLog.text snippet:

Get TeamFoundationServerUrl="http://vmtfs:8080/" BuildUri="vstfs:///Build/Build/10676" Force=True Overwrite=False PopulateOutput=False Preview=False Recursive=True Version="C19791" Workspace="VMLSBUILD_17"

We are using VS2005 with TFS 2008

A: 

Yes, the key is the line in your script:

Workspace="VMLSBUILD_17"

On the build computer, launch VS, click the "File" menu, and then choose "Source Control->Workspaces". Edit the workspace your script uses to only include the folders the build server needs. You can create multiple workspaces and choose which ones to use in your build scripts this way.

David Gladfelter
David appreciate your response and it was very helpful in addressing our issue. Thanks again.
Bill
This method is not recommended or supported.
Richard Berg
Unless configured otherwise, Team Build will delete the workspace and recreate it using the folders specified in the build definition for every build. Changes made to the workspace by editing it manually on the build server will typically be lost on the next build.
Jason Stangroome
+1  A: 

Unlike in 2005, in TFS 2005 the workspace mappings used during the Get process is part of the actual build definition. Use the Build Explorer tool inside VS to edit the mappings to your liking. (Note: since you're primarily running VS2005, the 2008 Team Explorer client will appear as a standalone app.)

Richard Berg
You're assuming that @Bill is using the TFS build definitions. I have a nightly build that I'm very happy with that uses powershell and MSBuild with the tfs command line tools. If the build feature of TFS had been useful to begin with, we might have gone down that route, but it's hard to justify re-visiting that effort.
David Gladfelter
Of course I'm assuming that. Do you think it's coincidence that his buildlog.txt matches Team Build's?
Richard Berg