如何在Visual Studio 2013中切換登錄用戶?

本文翻譯自:How can I switch my signed in user in Visual Studio 2013?

A new feature of Visual Studio 2013 is the ability to sign in with a Microsoft Account and have your settings be persisted across all of your instances of Visual Studio, amongst other things. Visual Studio 2013的一項新功能是能夠使用Microsoft帳戶登錄,並在所有Visual Studio實例中保留您的設置。

When I installed Visual Studio 2013 Preview I signed in with one of several Microsoft Accounts I hold. 當我安裝Visual Studio 2013 Preview時,我使用我持有的幾個Microsoft帳戶之一登錄。

I've now installed the RTM version of Visual Studio 2013 (after uninstalling the Preview version) and that has kept my previous user sign in credentials. 我現在已經安裝了Visual Studio 2013的RTM版本(在卸載預覽版之後),這使我以前的用戶登錄了憑據。

I would now like to change these sign in credentials to be a different Microsoft Account but every time I attempt to sign in with the new details I receive a message similar to the following 我現在想將這些登錄憑據更改爲不同的Microsoft帳戶,但每次我嘗試使用新的詳細信息登錄時,我都會收到類似以下內容的消息

We were unable to establish the connection because it is configured for user [email protected] but you attempted to connect using user [email protected]. 我們無法建立連接,因爲它是爲用戶[email protected]配置的,但您嘗試使用用戶[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. 要連接配置的標識,只需再次嘗試上一次操作。

The problem is I can't find any documentation anywhere on how to perform a "switch user operation". 問題是我找不到任何關於如何執行“切換用戶操作”的文檔。 Maybe I'm just not looking hard enough but hopefully someone here can help me out. 也許我只是看起來不夠努力,但希望有人可以幫助我。


#1樓

參考:https://stackoom.com/question/1JtRB/如何在Visual-Studio-中切換登錄用戶


#2樓

There is a comment about this under this answer, but I think it's important to list it here. 在這個答案下有一個關於這個的評論,但我認爲在這裏列出它很重要。 If you want to preserve your settings, export them first because they will be lost. 如果要保留設置,請先將其導出,因爲它們會丟失。

From MSDN forums - since I had to hunt around far too much to find the solution to this: 來自MSDN論壇 - 因爲我不得不尋找解決方案:

  1. Close Visual Studio 關閉Visual Studio
  2. Start the Developer Command prompt installed with Visual Studio as an administrator. 以管理員身份啓動隨Visual Studio一起安裝的Developer Command提示符。
  3. type 'devenv /resetuserdata' ('wdexpress /resetuserdata' for Express SKUs) 輸入'devenv / resetuserdata'(Express SKU的'wdexpress / resetuserdata')
  4. Start Visual Studio Normally. 通常啓動Visual Studio。

Worked for me. 爲我工作。


#3樓

Derek's answer above didn't work for me. Derek上面的回答對我不起作用。 I am using VS 2013 Ultimate and after signing out of Visual Studio, when i tried to sign in as another user, it gave error. 我正在使用VS 2013 Ultimate,在退出Visual Studio後,當我嘗試以另一個用戶身份登錄時,它給出了錯誤。

Then when connecting to the Team Project i saw the option to switch user, which is what i wanted all along. 然後當連接到Team Project時,我看到了切換用戶的選項,這就是我一直想要的。


#4樓

I resolved this problem by deleting the registry key under 我通過刪除下面的註冊表項解決了這個問題

hkey_current_user\\software\\Microsoft\\VSCommon\\12.0\\clientservices\\tokenstorage\\visualstudio\\ideuser HKEY_CURRENT_USER \\ SOFTWARE \\微軟\\ VSCommon \\ 12.0 \\ clientservices \\ tokenstorage \\ VisualStudio的\\ ideuser


#5樓

I was able to fix this by: 1) Sign in as the old user. 我能夠解決這個問題:1)以舊用戶身份登錄。 2) Sign out. 2)退出。 3) Sign in as new user. 3)以新用戶身份登錄。

In my case, it appears that it wanted to verify my license on the old account first, before it would let me switch to a new one. 在我的情況下,它似乎首先要在舊帳戶上驗證我的許可證,然後才能讓我切換到新帳戶。


#6樓

You don't need to reset all your user data to switch users. 您無需重置所有用戶數據即可切換用戶。 Try clicking on your name in the upper right corner then click on "Account settings". 嘗試點擊右上角的姓名,然後點擊“帳戶設置”。 There you will get an option to sign out of the IDE. 在那裏,您將獲得退出IDE的選項。 Once signed out you can sign back in as another Microsoft account. 退出後,您可以以另一個Microsoft帳戶重新登錄。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章