1
votes

When I try to do a local mapping from TFS, I get the following error,

The working folder --- is already in use by the workspace ---;User on computer ---

Any ideas on how to solve this?

3
Can you add more context?evolutionxbox
Just remap the workspace to a different local folder.Andy Li-MSFT
@Mkram Have you resolved the issue? any update?Andy Li-MSFT
I had use the tfs sidekick tool to solve the problem.Mkram

3 Answers

4
votes

I had a similar issue and could not install sidekick because I'm running VS 2k17.

I was unable to delete the workspace because it kept telling me it could not find the workspace. It was giving me the error even though I could clearly see the workspace in the workspaces list using:

 tf workspaces /computer:* /owner:* 

When I copied the exact values from the listing above and tried deleting the workspace with the syntax below I got the resulting error:

 tf workspace /delete myWorkSpaceName;Bob Smith
 TF14061:  The workspace myWorkSpaceName;Bob Smith does not exist.

The solution for me was to ask for xml format:

tf workspaces /computer:* /owner:* /format:xml

Now the resulting list of workspaces included a lot more information including workspace owner aliases not show in the simple listing. One of them was a long name with a guid and the account email for the owner. This finally worked for me:

tf workspace /delete myWorkSpaceName;aabe3ec12-1254-4956-b1ee-3fb26506931e\[email protected]

It asked for a confirmation and finally deleted my orphaned workspace.

2
votes

If the referenced workspace is no longer in use, you can delete it with TF.exe.

tf workspace /delete [/collection:TeamProjectCollectionUrl] workspacename[;workspaceowner] [/login:username,[password]]

Ref: https://docs.microsoft.com/en-us/vsts/tfvc/workspace-command?view=vsts

You can also use a tool like Attrice TFS Sidekicks to find and delete it.

Otherwise, listen to what the error says and map the workspace in a different folder.

0
votes

I faced this issue in Visual Studio 2017 too, and this is how the error message looks like:

Microsoft Visual Studio: Error: The working folder C:\… is already in use by the workspace … on computer ….

I did a lot of reading in vain, so this is what finally helped:

  • In Visual Studio, under ViewOther WindowsSource Control Explorer, the Workspace dropdown said there were no workspaces, but when I tried to add a new one, it yielded the above error.
  • Since I had to TFS in PATH (i.e. no TF in cmd), I typed Developer Command Prompt for VS 2017 in the Start menu and ran this CLI with administrator privileges.
  • First I wanted a list of my pending changes, so I knew what to save locally: TF status /r /user:%USER_NAME%.
  • Then I checked which workspaces were associated with my user by typing TF workspaces /collection:"http://%TFS_SERVER_NAME%:8080/tfs/%COLLECTION_NAME%" /owner:%USER_NAME%.
  • Now I deleted my workspace mappings by typing TF workspace /delete %WORKSPACE_NAME%;%USER_NAME% and confirming the potential loss of uncommitted changes.
  • Finally, I re-started Visual Studio and was able to create a clean new workspace (with the previous settings), mapping server to local paths. Alternatively, you can do it via FileSource ControlAdvancedOpen from Server….