How to make "Team Build" skip getting certain folders?

 

You have two options

  • Manually edit the WorkspaceMappings.xml file, which is present in $/TeamProject/TeamBuildConfigurations/<your build type> folder. Note that the client side mappings are ignored and only server side mappings are used. For the selected build type, you need to
    1. Check out the WorkspaceMapping.xml file
    2. Add the cloak mapping
    3. Check in the file.

For example you do not want to sync folder “$/MyTeamProject/TeamBuildConfigurations”. You add the following line in the mapping file-

<Mappings>

      <InternalMapping ServerItem="$/MyTeamProject" LocalItem="D:\paper\junk" Type="Map" />

      <InternalMapping ServerItem="$/MyTeamProject/TeamBuildConfigurations" Type="Cloak" />

</Mappings>

 

Please make sure that you enter a valid (existing) folder for cloaking.

  • Create a new build type with proper workspace as template. The exact steps are

    • Create the workspace with proper server mappings. (mapping that reflect the folders you want to sync on build machine). Local folder mappings for this workspace have no significance on build machine. 

i.e Workspace name = dummy

FolderMapping[0] {$/MyTeamProject ß > c:\temp, active}
FolderMapping[1] {$/MyTeamProject/TeamBuildConfigurations, cloak}

    • Create the new build type and select the “dummy” workspace.
      • On second page of wizard (one with header of “select and order solutions”), select “dummy” from the combo box

You can take either 1st or 2nd approach. The new/modified build type will make sure that cloaked folders are not downloaded.