使 Visual Studio 2019 始终从开始栏最近的解决方案列表中以管理员身份运行 [英] Make Visual Studio 2019 Always Run as Administrator from Start Bar Recent Solutions List

查看:25
本文介绍了使 Visual Studio 2019 始终从开始栏最近的解决方案列表中以管理员身份运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到了 Windows 10 和 Visual Studio 2019.

I recently upgraded to Windows 10 and Visual Studio 2019.

在升级之前,Visual Studio 2017 将始终以管理员身份运行.我没有想太多,但现在它消失了,这给我带来了问题.

Prior to the upgrade, Visual Studio 2017 would always run as Administrator. I did not think much of this, but now that it is gone it is causing me problems.

主要是它不会加载我使用本地 IIS 实例的项目.

我通常从开始栏启动 Visual Studio.现在是这样的:

I usually launch Visual Studio from my start bar. Right now this goes like this:

  1. 右键单击开始栏上的图标并选择我的解决方案.
  2. 它加载了,然后我意识到主项目没有加载.
  3. 关闭visual studio,以管理员身份打开
  4. 选择我的解决方案,然后加载.

我真的只想做上面的#1.有什么办法可以编辑开始栏上的快捷方式,让它始终以管理员身份启动吗?

I would really like to only have to do #1 above. Is there someway I can edit the shortcut on the start bar to have it always launch as Administrator?

推荐答案

当您单击开始菜单中提供的快捷选项列表时,结果是 Visual Studio 使用不同的权限.(IE 直接加载最近的解决方案.)

Turns out that Visual Studio uses different permissions when you click on the list of shortcut options it offers in the start menu. (IE to load a recent solution directly.)

选择属性->高级->以管理员身份运行"不会导致这些以管理员身份运行.

Selecting the Properties->Advanced->"Run as Administrator" did not cause these to run as administrator.

但这做到了:

  • 查找 devenv.exe(Visual Studio 的可执行文件)
  • 右键单击它并选择兼容性疑难解答".
  • 在程序兼容性疑难解答窗口中,点击程序疑难解答
  • 检查程序是否需要其他权限,然后单击下一步
  • 在下一个窗口中,单击测试程序...",VS 将以管理员身份打开
  • 单击下一步,然后单击是,为此程序保存这些设置
  • Find devenv.exe (Visual Studio's executable)
  • Right Click on it and select "Troubleshoot Compatibility".
  • On the Program Compatibility Troubleshooter window, click on Troubleshoot Program
  • Check that the program requires additional permissions and click Next
  • On the next window, click on Test the program… and VS will open as administrator
  • Click next and then click on Yes, save these settings for this program

现在 Visual Studio 将始终以管理员身份运行.

Now Visual Studio will ALWAYS run as administrator.

(取自:https://ppolyzos.com/2017/08/08/always-run-visual-studio-as-administrator/)

这篇关于使 Visual Studio 2019 始终从开始栏最近的解决方案列表中以管理员身份运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆