Wednesday, June 11, 2008

How to change user in Team Explorer

Since i installed Team Foundation Server 2008, i used Administrator login for test purposes. But after that i couldn't change user in team explorer.
To do it, you should run Stored User Names and Passwords dialog box, to do so, either run command rundll32 keymgr.dll,KRShowKeyMgr or open it from control panel
Select your server and press Change button. Type new username in popup window.

But if you try to change a file in VS you'll get error "TF14091:You cannot perform this operation on workspace workspace;server\username because you are not the owner of the workspace."
To fix the error, you should remove old workspace and add new.
(Note, you should check-in your pending changes to avoid data loss).
1. Run Visual Studio 2008 Command Prompt (Start->All Programs->Microsoft Visual Studio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt)
2. Type tf workspace /delete yourcomputername /server:servername
If you receive an error, you can try to search for 'VersionControl.config' file and remove it and then try to do the mentioned steps again.
3. Type tf workspace /new /server:servername and fill fields in popup window

Last thing you should do is to open your project, right-click on solution and select Get Latest Version command.

3 comments:

Rodrigo Gonzalez Balsa said...

Thank you for the help! Without this post I couldn´t have solved it!

Anonymous said...

This also fixed my issue. Before, my workspaces would randomly seem to change user accounts between mine and the one I use for the TFS server share. Removing this fixed it. Thanks!

E u g said...

I had exactly the same error but completely different cause and solution:

TFS seems to have got my credentials mixed up.

I was working in VS2010 as normal; i left it open in the background and as part of another task I needed to go and find a document off a shared folder (manually via Windows Explorer). I did not have permissions to access the share so it prompted for a username and password. I entered a network user's details, mapped the drive and got to the share as expected. However, from that point on TFS thought I was that user and it would not let me see any TFS files or shelvesets. The fileshare happens to be on the same server as our TFS server.

I had to delete the mapped drive before I could get VS to work correctly agian with TFS. Annoying.