How to switch TFS user name in Visual Studio 2012


Today, in one of our several common Virtual Machines,  I wanted to access TFS which is in our VPN Company network. Previously some one else was working on that machine, so his credential for TFS is stored as a default user. So this is not a problem in Visual Studio 2010, because you can just switch user and connect to TFS. But for Visual Studio 2012 you have a two cases.

In case of VisualStudio.com service, there is an option to log out from current user name.

But if you want to connect to classic Team Foundation Server this is not a case.

In Visual Studio 2012 there is no action for that in the current window, as you can see on the picture below.

If you want to change user name, you need to find solution somewhere else not here.

In fact to change user name of previous connection, you have to delete cached connection or at least modify it which is stored in Windows Credential in Control Panel.

So open Control Panel->User Account and choose Manage your credentials

Within Windows Credential find connection to TFS and remove it, or edit it if you like.

Restart Visual Studio 2012, and try to connect to TFS, you should get the prompt for User name and password: