Question

I am working in a project where a main branch is set up with several parallel development and release branches. This means a lot of files that are identical or quite similar exist side by side in the same workspace. When a new build is triggered on the TFS 2010 build service the entire workspace is checked out, including 15 "copies" of the main branch. However, the only items needed for the build are in the main branch. Since the checkout is quite time consuming it would be desired to limit the files that are checked out to the ones in the main branch. Is there a way to instruct the build server to do this? I can imagine writing a custom build task that replaces the default GetWorkspace activity may solve the problem, but I would rather find out how to configure the existing build definition if it is possible.

Was it helpful?

Solution

If you right click on the build definition and select "Edit Build Definition..." it'll bring up a dialog that allows you customize a lot of what happens with your build. In the left hand menu there is a "Workspace" tab that allows you customize exactly what code the build will grab. You can select the main folder that contains all the different versions of your code if that makes the most sense to you, and then add subfolders that you want the build to ignore and mark them as cloaked. The build will then just pretend they aren't there. Here's a link from an msdn forum that describes this: http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/baf55d77-560b-407a-8045-b1f6cad662b3/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top