Excluding from a Team Build using Cloaked Folders

If you're building a project in Team Build, you may have noticed that the Team Build process retrieves everything in the project folder. If you have a very large project folder, this can be a problem.

To expedite builds, you can cloak subfolders that you don't want to retrieve during the build. On your own machine, you can cloak folders through the Source Control, Workspaces menu:

There's a little drop-down menu next to each workspace mapping that lets you select between "Active" and "Cloaked". The intent of this feature is to allow you to map a big chunk of a tree to your workspace, while selectively pruning (cloaking) the sections you aren't interested in to save time.

On the build machine, you can do the same thing by editing the WorkspaceMapping.xml file.

The build process is a developer, too. It has workspace mappings just like you do. So when we edit WorkspaceMapping.xml, you're basically setting up the workspace mappings for the "build developer".

To suppress subfolders from the build, check out the WorkspaceMapping.xml file and add some new <InternalMapping> entries of Type="Cloak":

<Mappings>
  <
InternalMapping ServerItem="$/ClientApp" LocalItem="boguspath" Type="Map" />
  <
InternalMapping ServerItem="$/ClientApp/ExcludeMe" LocalItem="boguspath" Type="Cloak" />
</
Mappings>

Check the file in, perform a build, and you'll notice in the build logs that the ExcludeMe folder was not retrieved prior to the build.

posted on Wednesday, October 04, 2006 3:28 PM by jatwood

Comments

# 另一篇 Team Build 應用小技巧

Team Build 或者是說 &quot;MSBuild&quot;,我個人真的深切的期待 看到很多人 深入的運用著. 以下的整合範例,介紹了 如何利用 MSBuild 來 ByPass 某些不想 Build 的目錄 Link
Friday, October 06, 2006 5:45 AM by Refines.Info["Polo Lee"]

# VSTS Links - 10/10/2006

Brian Harry on Visual Studio SP1 Feedback and The Training That Just Won't Die.

Eric Jarvi on VSTS...
Tuesday, October 10, 2006 7:45 AM by Team System News

# Modifying the default Team Build


One annoying thing about Team Builds created through the Team Build wizard is that they pull down all...
Monday, February 05, 2007 12:47 PM by Team System