TFS Build "Workspace already mapped" Issue - Willy-Peter Schaub's Cave of Chamomile Simplicity

TFS Build "Workspace already mapped" Issue

Group of Blue Businessmen Piling up to Form a Pyramid Clipart Illustration If you are creating multiple build types, i.e. daily, weekly, continuous and others for a Team Project, you may have ... with all likelihood ... encountered the "workspace already mapped" and "path too long" issues using defaults when completing the TFS Build wizard and not giving the working directory much thought. There are a number of good blog posts available that discuss this topic in more detail, i.e. http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3554768&SiteID=1 and http://blogs.msdn.com/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx and colleagues such as Martin and Grant cover the TSF Build extensively on their blogs as well.

Basically the recommendations include the following considerations when defining a Team Build:

  1. Keep your working directory as short as possible, because the length of filenames, made up of the working directory and the solution paths quickly consume the 260 available characters.
  2. Include $(BuildDefinitionPath) and/or $(BuildDefinitionID) in the build directory path for the build agent, using the following template:

image

Some examples:

  • c:\i\$(BuildDefinitionID)
  • c:\i\$(BuildDefinitionPath)

or using the default of:

  • $(Temp)\$(BuildDefinitionPath)

The resultant structure on the build agent could then look similar to:
image

The above examples will create a flood of critique due to not being meaningful, however, the short meaningless directory name is used to try to ensure that the path remains < 260.

Have I mentioned that a book on Team Build, covering all its mysteries, challenges, best practice and power is a gem we have been waiting for for a long, long time ... ping, ping ... in the interim Bucks blog post TFS 2008: A basic guide to Team Build 2008 is a "must read" when working with Team Build.

Published Tuesday, July 08, 2008 7:26 PM by willy
Filed under: , ,

Comments

# TFS Build - Interactive Agents

Wednesday, July 09, 2008 9:54 AM by Willy-Peter Schaub's Cave of Chamomile Simplicity

In the previous build post TFS Build &quot;Workspace already mapped&quot; Issue we covered a common build

# VSTS Links - 07/14/2008

Monday, July 14, 2008 2:25 PM by Team System News

Sean Lumley on Collecting Code Coverage when Running Web and Load Tests James Whittaker on before we...

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: