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.