如何在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 olduser@old.com but you attempted to connect using user newuser@new.com. 我们无法建立连接,因为它是为用户olduser@old.com配置的,但您尝试使用用户newuser@new.com进行连接。 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帐户重新登录。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值