/
TFS Source control throwing workspace exist error on Discover/Build

TFS Source control throwing workspace exist error on Discover/Build

If you are using TFS (Teams Foundation Server) as Source Control and you are getting an error like:

FDSV-00690: Error executing export of revisions from project sources: Failed to initialize local repository for

Caused by: com.microsoft.tfs.core.exceptions.TECoreException: The workspace FD_LOCAL;ACCOUNT already exists on computer COMPUTER.

As TF Admin, you would have to fetch the matching workspace and owner ID. You can first fetch the workspaces using the command

tf.exe workspaces /computer:* /owner:* /format:xml > workspaces.xml

 This will create an XML File, once it is created, you can open it and search for the workspace with the Account Name shown in the Exception above (ACCOUNT).

Once you get the workspace and matching owner ID, you can delete it using

tf workspace /delete {WORKSPACE.name};{WORKSPACE.ownerid}

version control - How to remove another user's TFS workspace mapping - Stack Overflow

The following macros are not currently supported in the footer:
  • style