Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switching Visual Studio user - Visual Studio Premium

I want to switch the Visual Studio user but I got the following error.

We were unable to establish the connection because it is configured for user [email protected] but you attempted to connect using user [email protected]. To connect as a different user perform a switch user operation. To connect with the configured identity just attempt the last operation again.

I also tried to reset the user data like described here in this post but nothing changed. I also reinstalled Visual Studio and that didn't help.

Any hint?

Screenshot

like image 909
Boas Enkler Avatar asked Mar 10 '14 09:03

Boas Enkler


2 Answers

There are two workable options I now use (in order):

As of Visual Studio 2013 Release 4

  • Ensure you login correctly using the current user ID it expects first.
  • Then logout from the Account Settings option on the account drop-down menu (top right, usually showing your name)
  • Now login again using the other account

It appears VS simply does not like to login to a different account while you are already logged in. Just make it happy first :)

Fallback option: You need to run devenv /resetuserdata at the command prompt.

To run the “switch user operation”:

  • Close all instances of VS2013 (Check Task Manager to make sure devenv.exe is not running).
  • Open a Developer Command Prompt for VS2013.
  • Type devenv /resetuserdata and wait for it to complete,.
  • Restart VS2013 and follow the usual “sign in” steps (with the desired account).

This process clears the same registry keys (and a few more) suggested by other solutions.

like image 144
Gone Coding Avatar answered Sep 20 '22 01:09

Gone Coding


Meanwhile I found it. In addition I had to delete a registry key

hkey_current_user\software\Microsoft\VSCommon\12.0\clientservices\tokenstorge\visualstudio\ideuser 

It seems like this key is neither affected by resetting the environment nor uninstalling VS 2013.

From this MSDN Forum post:http://social.msdn.microsoft.com/Forums/en-US/d2ef5828-ce0b-405a-b0b8-9809fc8ac0f7/cant-switch-user-in-visual-studio-2013?forum=visualstudiogeneral

like image 43
Boas Enkler Avatar answered Sep 22 '22 01:09

Boas Enkler