ChrisA
ChrisA

Reputation: 4193

TFS 2015 workspace keeps coming back after delete

I can't remap my dev folder to TFS 2015 after an upgrade. Here's what I've done:

The new server has replaced the old one and has the same IP address. My dev machine is Windows 10 Enterprise and my user is in the admin group. UAC is off.

The working folder XXXX is already in use by the workspace YYYY;MyUser on computer MyComputer

However, when I attempt to remap the same folder, I get the same message.

I've also deleted the workspace using the command line (tf workspace /delete); the delete appears to work since when I try to delete it again, it tells me the workspace doesn't exist.

However, no matter how I try to remap the same folder, the workspace keeps coming back.

How can I get rid of it completely?

Upvotes: 2

Views: 1198

Answers (1)

ChrisA
ChrisA

Reputation: 4193

Ok, it turned out that the key was that although the IP of the new server is the same as the old one, its name is different.

Once connected to the new TFS, in Visual Studio Team Explorer, I seemed to have access only to workspaces created on the new one.

With the tf command line utility, I could get at the other ones. So for example:

 tf workspaces /owner:OldServerName\Myuser /server:http://ServerIP:8080/tfs/CollectionName

...would list all the workspaces I'd used on the old server.

The clue that gave it away was that initially I specified /owner:MyUser, and it told me that the user specification was ambiguous (I use the same user name on the new server as the old one). Once I qualified it with the old server name, everything just worked.

Then:

tf workspace /delete /collection:http://ServerIP:8080/tfs/CollectionName /login:OldServerName\MyUser workspacename

...resulted in a password prompt. I entered the password, and the workspace was deleted.

Listing them again didn't show the deleted one, and a query on tbl_Workspace in the underlying TFS database confirmed that the workspace was indeed gone.

Once I'd cleared out the workspaces from the old server in this way, I could create a new workspace in VS Team Explorer and map my projects.

Upvotes: 2

Related Questions