TFS 2008 getting all branches of source code while building one project
When I build one of our projects in TFS 2008 it takes about 30 minute开发者_如何学Pythons 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
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.)
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.
精彩评论