4
votes

I'm using VS2017 and VSTS. After a number of OS upgrades I've now ended up with 3 workspaces that points to my computer. If I run the command "tf workspaces /owner:* /computer:{my computer} /server:https://{xxx}.visualstudio.com /format:detailed" I can see that the workspaces are all identical except that they have unique working folders.

Instead of keep adding new workspaces that points to different folders, I would like to scratch them all and start over. However, when I run the command "tf workspace /delete /server:https://{xxx}.visualstudio.com ", I get the following error message: "TF14061: The workspace {my computer};{owner/my name} does not exist.".

And, If I try the same command but with owner specified and/or with collection specified and/or with location specified, I get the following error message: "Specify one workspace."

Any ideas on how to solve this issue would be appriciated.

1
Have you tried to remove them using tfs sidekicks ? (attrice.info/downloads/index.htm#tfssidekicks2015)D.J.
Yes, I tried Sidekicks, but I could not get it to work. Maybe I'm doing something wrong, but after connecting to the server, the Workspace tool lists no Workspaces. I suspect that Sidekicks 2015 does not work with VSTS.Andvik
Try to clear the cache of VSTS/TFS (path likes: C:\Users[username]\AppData\Local\Microsoft\Team Foundation[version]), then check the workspaces. On the other hand, try to remove all workspaces by calling tf workspaces /remove:* /collection:XXXstarian chen-MSFT
I've deleted the cache and when I try to remove workspaces I get the following message: "No workspace in the cache matches * for server {collection}.". But, when I try to add a new workspace and reuse one of the old folders I get the following error: "The working folder {path} is already in use by the workspace {computer};{owner}" on computer {computer}".Andvik
What's the detail command? Try to run devenv /resetuserdata and check the result.starian chen-MSFT

1 Answers

5
votes

It they are your personal workspaces then you can also delete them using the Manage Workspaces dialog opened from the Source Control Explorer. If your computer name changed as part of the OS upgrades, you need to tick the Show remote workspaces checkbox in the bottom of the dialog.

Simply mark the workspaces that you want to delete and click the Remove button: Manage your workspaces

This guide is for Visual Studio 2012, but nothing has changed.

As suggested elsewhere Team Foundation Sidekicks is also a good way of removing workspaces - both your own and others. It does not work out of the box on a computer with only VS 2017, but there is a workaround for this.