TFS Build Error: Path Already Mapped in Workspace

by Larry Spencer Thursday, July 21, 2011 2:56 PM

Wondering why my unit tests were suddenly not running under TFS on our build server, I finally decided to delete and recreate the build definition. I kicked off a TFS build with the new build definition and got a log that consisted of just this error:

The path <blah> is already mapped in workspace <blah>.

One post on suggested running the command...

tf workspaces /owner:* get a list of workspaces and then running...

tf workspace /delete WORKSPACENAME;OWNER

...where WORKSPACENAME is the name given in the error message and OWNER is the owner of the workspace (TFSService in our case).  That was sound advice, but some facts were missing. Maybe they'd be obvious to someone better-versed in TFS than I, but here they are.

  1. You'll need permissions in TFS to delete the workspace.
  2. The command prompt should be on a client machine, not on the build server. That's because of the next requirement.
  3. In the command-prompt window, you should be in a directory that is contained in the workspace.

That worked for me. If it doesn't fix the problem for you, see the post I referenced for more suggestions.

BTW, my unit tests still didn't run. Maybe I'll post about that next, after I solve the problem.


All | General

About the Author

Larry Spencer

Larry Spencer develops software with the Microsoft .NET Framework for ScerIS, a document-management company in Sudbury, MA.