Team Build Error: The Path … is already mapped to

2019-01-04 17:14发布

When creating a new build in Team Foundation Server, I get the following error when attempting to run the new build:

The path C:\Build\ProductReleases\FullBuildv5.4.2x\Sources is already mapped to workspace BuildServer_23.

I am unable to see a workspace by that name in the workspaces dialog.

20条回答
爷、活的狠高调
2楼-- · 2019-01-04 17:49

For some reason I was having trouble deleting the workspace from the command-line utility. Luckily I found Team Foundation Sidekicks 2010 (from this post) which is free and provides a GUI for viewing and deleting TFS workspaces, and many more useful TFS features.

查看更多
手持菜刀,她持情操
3楼-- · 2019-01-04 17:49

I tried all the following solutions such as :

  1. Use sidekicks to delete WS.
  2. Use tf commands to delete remote server workspaces.
  3. Delete the TFS cache folder.

The following worked for me:

tf workspaces /remove:*
查看更多
聊天终结者
4楼-- · 2019-01-04 17:50

I had a similar problem with Visual Studio 2010 complaining about an already-mapped-workspace, but instead of deleting the entire workspace, I used the following from the Visual Studio Command Prompt: "tf workspace PROBLEM_WORKSPACE_NAME". This brought up an "Edit Workspace" dialog. From there I was able to remove the path in question from the "Working Folders" list, which got rid of the error.

查看更多
别忘想泡老子
5楼-- · 2019-01-04 17:50

I was getting an exception telling me that the file was already mapped in another workspace: "The path {File Path} is already mapped in workspace {Workspace Name}."

This workspace was deleted beofre. With the help of friend of mine I found out that TFS save workspace info under the user local settings dir. We found a file named:

VersionControl.config under {User Documents and Settings dir}\Local Settings\Application Data\Microsoft\Team Foundation\1.0\Cache. This file contains all the local mapping of TFS. Probably when you use the Map method and don't use: public void DeleteMapping(WorkingFolder mapping); before deleting the workspace the mapping information is not removed from this file which is used by TFS to check if you've alreay mapped a specific path.

To resolve this problem delete all the keys from the config file. Don't delete the file because you'll get it again from the server cache.

查看更多
贼婆χ
6楼-- · 2019-01-04 17:50

While trying to 'Get latest version' of a project which I had previously mapped to a local directory and then deleted, I saw this same error message. First I tried the SideKick tool and then the Visual Studio 2010 command prompt, both of which told me I had no workspaces mapped.

Next I searched for 'VersionControl.config' within c:/users/myuser/appdata, and deleted the 4 references it found. I re-opened Visual Studio and I was able to re-map the project, no more error!

查看更多
Anthone
7楼-- · 2019-01-04 17:50

My issue was related to using multiple accounts. This is how I was able to switch accounts.

Open Team Explorer

From the big drop down menu near the top of the pane...

Navigate to: Projects and my Teams>Manage Connections

Navigate to: Manage Connections>Connect to Team Project

Use the "Switch User" link to switch accounts.

Now the workspace names will match the chosen account.

查看更多
登录 后发表回答