Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
695 views
in Technique[技术] by (71.8m points)

visual-studio - 您是否可以强制Visual Studio始终以Windows 8中的管理员身份运行?(Can you force Visual Studio to always run as an Administrator in Windows 8?)

In Windows 7, you could go into a programs compatibility settings and check off to always run as an Administrator.

(在Windows 7中,您可以进入程序兼容性设置并选中以始终以管理员身份运行。)

Is there a similar option in Windows 8?

(Windows 8中是否有类似的选项?)

I've always disabled UAC on my machines, and did the same after my Windows 8 upgrade, or so I thought.

(我一直在我的机器上禁用UAC,并且在我的Windows 8升级之后做了同样的事情,或者我认为。)

It turns out there is no off option, only turning off the notifications.

(事实证明,没有off选项,只关闭通知。)

This means nothing is run as an Administrator despite being in the Administrator group.

(这意味着尽管属于管理员组,但没有任何内容作为管理员运行。)

I need to keep closing and reopening my consoles\Visual Studio when I try to debug (attach to process, not F5 ), which is very frustrating.

(当我尝试调试(附加到进程,而不是F5 )时,我需要继续关闭并重新打开我的控制台\ Visual Studio,这非常令人沮丧。)

It's really annoying that I need to either remember to take extra steps to open it as an Administrator or tell it to close and re-open when I go to debug for the first time.

(真的很烦人,我需要记得采取额外的步骤以管理员的身份打开它,或者告诉它在我第一次调试时关闭并重新打开。)

  ask by Brian Surowiec translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In Windows 8 & 10, you have to right-click devenv.exe and select "Troubleshoot compatibility".

(在Windows 8和10中,您必须右键单击devenv.exe并选择“疑难解答兼容性”。)

  1. Select "Troubleshoot program"

    (选择“排除程序故障”)

  2. Check "The program requires additional permissions"

    (选中“该程序需要其他权限”)

  3. Click "Next"

    (点击下一步”)

  4. Click "Test the program..."

    (点击“测试程序......”)

  5. Wait for the program to launch

    (等待程序启动)

  6. Click "Next"

    (点击下一步”)

  7. Select "Yes, save these settings for this program"

    (选择“是,保存此程序的这些设置”)

  8. Click "Close"

    (点击“关闭”)

If, when you open Visual Studio it asks to save changes to devenv.sln, see this answer to disable it:

(如果在打开Visual Studio时它要求保存对devenv.sln的更改,请参阅此答案以禁用它:)

Disable Visual Studio devenv solution save dialog

(禁用Visual Studio devenv解决方案保存对话框)


If you change your mind and wish to undo the "Run As Administrator" Compatibility setting, see the answer here: How to Fix Unrecognized Guid format in Visual Studio 2015

(如果您改变主意并希望撤消“以管理员身份运行”兼容性设置,请在此处查看答案: 如何在Visual Studio 2015中修复无法识别的Guid格式)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...