1

I am working on a computer where I had set up a connection to tfs successfully. I ran a command yesterday in the visual studio command prompt that has switched the user the computer thinks I am. If I run tf workspaces I get:

=============================================================

Workspace : HSS12093 Owner : Graham Computer : HSS12093 Comment : Collection : integrationtest\HSSSoftware Permissions: Private Location : Local File Time : Current

Working folders: $/HSSWebSolutions: D:\HSSWebSolutions $/HSSWebSolutions/HSSReportingPortal: D:\HSSWebSolutions\HSSSolutions\Projects\ HSSReportingPortal

=============================================================

Workspace : HSS12093 Owner : Integrationtest Development Access Account Computer : HSS12093 Comment : Collection : integrationtest\HSSSoftware Permissions: Private Location : Local File Time : Current

Working folders:

This has been working fine as I have been logged in as Graham since it was set up. When I ran a tf command from the command prompt yesterday though it asked for credentials of an admin user and I put in the admin account username and password (for Integrationtest Development Access Account).

My machine now thinks that I am logged in as this account and I can no longer map to my local drive version of the code files.

I have tried deleting the workspace for the Development account but this doesn't work. I need some way to switch back to the original account. If I try and map to the folders I get the error that these are already mapped to Graham. If I try and change the owner in visual studio I get an error that 'The workspace HSS12093:Graham already exists on computer HSS12093'.

Is there a way I can switch the account I am logged in as? I have tried using:

tf workspaces HSS12093;graham /login:graham;<password>
GrahamJRoy
  • 1,603
  • 5
  • 26
  • 56
  • I suspect you'll need to run `tf workspace HSS12093;graham /newuser:graham` and you may need to clear the credentials in the Windows Credential Manager. – jessehouwing Nov 17 '16 at 12:11

2 Answers2

5

You can run this command to change the owner of the work space:

tf workspace Workspacename;Currentowner /newowner:newowner /collection:collectionurl
Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60
0

For this situation, you need to remove this workspace mapping with TFS. And then remap the workspace with account HSS12093 (You just need to use this account in VS to connect TFS server)

About how to remove the workspace mapping, you can refer this similar question: How to remove a TFS Workspace Mapping? There are also many other useful articles in the web.

Community
  • 1
  • 1
PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62