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.
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>
<?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: tfs, team foundation, team build