Team Build Error: The Path ... is already mapped to workspace

I received this error, which was caused by having two build definitions that pointed to the same source. The issue was that I used a static build directory in the Build Agent.

This forum post describes my issue and resolution exactly: http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/60a4138a-9b28-4c46-bdf4-f9775ce43c3e/


Use the command line utility TF - Team Foundation Version Control Tool (tf).

You can get a list of all workspaces by bringing up a Visual Studio Command Prompt then changing to your workspace folder and issuing the following commands:

C:\YourWorkspaceFolder>tf workspaces /owner:*

You should see your problem workspace in the list as well as it's owner.

You can delete the workspace with the following command:

C:\YourWorkspaceFolder>tf workspace /delete /server:BUILDSERVER WORKSPACENAME;OWNERNAME

Just delete the contents of the following folder(s):

C:\Users\UserName\AppData\Local\Microsoft\Team Foundation\3.0\Cache

Where UserName is actual or current user, and 3.0 is the version number.


I had a similar issue and to remove the workspace that was causing me a problem, I logged into another machine with TFS client installed and performed the following:

  • On the File menu, point to Source Control, Advanced, and then click Workspaces....
  • In the Manage Workspaces dialog box, tick the Show remote packages checkbox.
  • Under the Name column, select the workspace that you want to remove, and then click Remove.
  • In the Confirmation dialog box, click OK.