Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I regain access to my Team Foundation Server Workspace?

I restarted IIS on our TFS server, and ever since then I haven't been able to access my workspace.

Regardless of what I do, it continually creates a workspace owned by a service account, and not my corporate account.

A couple days ago I had opened SSMS 2008 with "Run as different user" and used that service account. That's the only way I can think that it got in the picture.

So if I run tf workspaces /owner:* I see two workspaces, one owned by me, and one owned by the service.

When I open VS2010, it loads the workspace owned by the service account, and I can't view the other workspaces. Running tf /delete on the wrong one deletes it and running tf /remove:* clears my cache, but when I open VS2010, it is created again.

I tried running VS2010 with "Run as different user" and used my credentials, with no luck.

Anyone have any ideas as to how to get my workspace back??

like image 969
IronicMuffin Avatar asked Jan 18 '12 17:01

IronicMuffin


People also ask

How do I access Team Foundation Server?

From the Visual Studio Tools menu, select Options, then select Source Control > Plug-in Selection. Select Visual Studio Team Foundation Server. For Visual Studio Team Foundation Server, enter the name and port number for the Azure DevOps Proxy Server. Select Use SSL encryption (https) to connect.

How do I find Team Foundation Server URL?

http://myserver:8080/tfs/project-name -- on premises Azure DevOps installation (Azure DevOps Server / Team Foundation Server)

How do I change my workspace in TFS?

You cannot move a workspace from one computer to another. However, if the name of your dev machine has changed and you want that change to appear in this field, run tf workspaces /updatecomputername. Permissions: For a workspace you are using on a dev machine for a single developer, set this to Private workspace.

What is TFS workspace?

You use the TFS workspace to map a local working folder on your PC to a Source Control Folder within a TFS project repository.


2 Answers

You can change the owner of a workspace using the /newowner flag to the tf workspace command. For example:

tf workspace /collection:http://server:8080/DefaultCollection workspaceName;oldOwner /newowner:newOwner

This should work as a stopgap measure to allow your old workspace to be owned by the service account. To update this, make sure that you do not have credentials saved for your TFS server in Control Panel -> Credential Manager. These credentials will always override your logged in user credentials or anything specified to runas.

like image 166
Edward Thomson Avatar answered Sep 20 '22 13:09

Edward Thomson


So, not an answer, but a workaround.

I set the actual workspace to public, and now I can at least load it.

I have no idea why VS/TFS thinks I am a service account.

EDIT: Turns out I had the service account credentials for the tfs server saved in Credential Manager. Removing the credentials and restarting VS2010 resolved the issue.

like image 45
IronicMuffin Avatar answered Sep 20 '22 13:09

IronicMuffin