Yesterday due to some locking and conflict issues I need to delete a workspace on one machine. Initially I was searching Visual studio for any option to delete it something like Right click delete optionJ, unfortunately there is no option like this; I don’t understand why Microsoft is not providing nice GUI interface for TFS management just like other Microsoft servers. Command prompt is only way to do any TFS management related operations.
Ok so next problem is- the command to delete or unlock the workspace?
Some MSDN and Google search solves the problem. Here are the TFS commands which you can use on “Visual studio Command prompt”
List the Workspace names, owners etc
- tf workspaces /server: ServerName
/owner:* - tf workspaces /server:
ServerName /owner: OwnerName
Delete the workspace
- tf workspace /server: ServerName
/delete WorkspaceName
Remember after deleting workspace you can not recover it…
you can find more workspace related commands at
http://msdn.microsoft.com/en-us/library/54dkh0y3(VS.80).aspx
4 comments:
I ran into the same issue as well and it was the command promt that saved me as well. There's another important command which only removes cached workspaces (this is useful when connection cannot be made to the TFS server and so * tf workspace /server: ServerName /delete WorkspaceName won't work):
tf workspaces /remove:*
Thanks for this post. It was very helpful when I was trying to delete an old duplicated workspace. Great instructions!
Thanks a lot.
I have a 5 project mapped on my machine. The folder size is so large that I want to unmapped few unused project to spare some space on my local drive. Do you know how can I unmapped folder in TFS, so that I can recover hard-drive space back.
Post a Comment