Welcome to MSDN Blogs Sign in | Join | Help

Schema for the WorkspaceMapping.xml file

The WorkspaceMapping.xml file is one of the files generated when creating a new build type.  Those of you who've had to customize a build are probably familiar with the TfsBuild.proj file, which is the top-level file used to orchestrate the build.

The WorkspaceMapping.xml file is used by one of the custom tasks to create the TFS workspace that contains the files to be built.  In version 1 of Team Build, you must edit the WorkspaceMapping.xml file in order to change the mappings used by the workspace created for the build (in Orcas, you can do this in the GUI, and this file is no longer generated or used).

There’s no formal schema on MSDN.  Here are the rules.

  • The ServerItem should be a valid server path.
  • The server paths must all be in the same team project.
  • A server path can either be mapped or cloaked (for more information on mappings, see this MSDN topic on working folder mappings).
  • The local path for a mapped server item needs to be a legal local path, but it’s otherwise completely ignored.  This is an important difference between this workspace mapping template file and real source control mappings that you may be used to.
  • Do not specify local paths for cloaked mappings.
  • All cloaked paths must be children of mapped paths (cloaking is just a means of avoiding getting parts of an otherwise mapped tree).

Here's an example of a mapped and cloaked path.

<?xml version="1.0" encoding="utf-8"?>

<SerializedWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <Mappings>

    <InternalMapping ServerItem="$/TeamProject/Some/Path" LocalItem="c:\this\path\is\ignored" Type="Map" />

    <InternalMapping ServerItem="$/TeamProject/Some/Path/Cloaked" Type="Cloak" />

  </Mappings>

</SerializedWorkspace>

This post only applies to Team Foundation Server 2005.

tags: , ,

Published Wednesday, February 28, 2007 8:00 AM by buckh

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Schema for the WorkspaceMapping.xml file

I've come to like the WorkspaceMapping file! I hope the UI is as flexible as having the raw XML.

A handy post....thanks!

FTD

Wednesday, February 28, 2007 8:47 AM by FreeToDev

# re: Schema for the WorkspaceMapping.xml file

The Orcas GUI is actually more flexible.  You can actually specify local paths if you need that ability (should be rare).

Buck

Wednesday, February 28, 2007 10:07 AM by buckh

# VSTS Links - 03/02/2007

Buck Hodges on Schema for the WorkspaceMapping.xml file. Michael Ruminer on TFS Event Subscription...

Friday, March 02, 2007 10:13 AM by Team System News

# Stop piling on when the build breaks: Build checkin policy for Continuous Integration in Orcas

Last fall, Clark Sell wrote a blog post called Stop, the build is broken!! that introduced a checkin

Wednesday, March 28, 2007 7:08 PM by Buck Hodges

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker