Can't remove workspace from TFS

The problem is that the current project location, the folder on your physical machine, is mapped to a different TFS server. To add it to source control you need to move it to a physical location not associated with a TFS server.

Edit To remove the offending workspace:

1) Use the "Team" menu to connect to the TFS Server that you do NOT want to be mapped to

2) Use ctrl+q --> workspaces to access the workspaces menu

3) Remove the workspace

4) Change to the TFS Server you WANT to be mapped to using the "Team" menu again

5) ctrl+q --> workspaces

6) Add a new workspace


Try any of these steps out. Some of them may not be applicable to you.

To clear up "cached workspace" and remove workspace mapping.

  1. On Control Panel > User > Credential Manager Remove Windows Account and Generic Account that points to TFS.
    How can I change the default credentials used to connect to Visual Studio Online (TFSPreview) when loading Visual Studio up?

  2. On IE, remove cached password.
    http://www.jayway.com/2012/12/17/changing-tfs-credentials-in-visual-studio-2012/

  3. Remove stored username/password:
    http://blogs.msdn.com/b/visualstudioalm/archive/2012/08/29/clearing-the-credentials-for-connecting-to-a-team-foundation-server.aspx

    rundll32.exe keymgr.dll,KRShowKeyMgr

  4. Delete workspace. On VS2012 command line, run the following:

    tf.exe workspace /delete workspacename;owner /server:serveraddress
    http://mycomputeradventures.blogspot.com/2012/01/removing-tfs-workspaces-from-old-users.html

  5. Clear Up cached workspace mapping. On VS2012 command line, run the following:

    tf.exe workspaces /remove:* (or /s:http//oldserver:8080)
    http://blogs.msdn.com/b/buckh/archive/2006/09/12/path-is-already-mapped-in-workspace.aspx


if you use Visual studio 2012 go

C:\Users{UserName}\AppData\Local\Microsoft\Team Foundation\4.0\Cache

or if it is Visual studio 2013 go

C:\Users{UserName}\AppData\Local\Microsoft\Team Foundation\5.0\Cache 

Remove all things under it.

Tags:

Tfs