A safe and painful place for Windows 10 is that the behavior of UAC is changed. In the past, in Windows 7, as long as UAC was turned off and its account was the Native Admins group, any program would start as an administrator. However, on Windows 8, we can't turn off UAC, so the Metro program won't start any more.
As a code farmer for Microsoft technology, we usually have Visual Studio running under administrator privileges. Although we can select "Run as Administrator" in the right-click menu every time, superfluous's action is always painful. After some reclamation, I finally found a way to force the VS to start as an administrator.
The web-based approach solves only one problem, starting vs is actually administrator rights, but if it is opened by a shortcut to the SLn file, it is not an administrator.
The right solution should be this:
First, as with the online version, the following two steps need to be done:
- Opens the Properties dialog box for the VS shortcut.
2. Tick "Run as Administrator"
Now that you double-click the shortcut to VS, you can actually start with the administrator. However, in this case, still cannot start as an administrator, you must first open VS, then open solution, Egg:
The workaround is simple:
Open the VS installation directory and find devenv.exe (i vs Path for C:\Program Files (x86) \microsoft Visual Studio\2017\enterprise\common7\ide\ devenv.exe), right-click and select "Compatibility Troubleshooter".
Select "Troubleshooter"
Select "This program requires additional permissions"
After confirming the user Account Control, click Test Program, otherwise this dialog box won't let you click Next. It hurts, why don't you disable the Next button?
When you click on "Test program", VS will start with administrator privileges. That's right.
6. Go back to the Compatibility Troubleshooter dialog box, click Next, then select "Yes, save these settings for this program" and you're done.
Now, whether you start vs directly or double-click SLn to start vs, it will run as administrator;
Force Visual Studio to run as Administrator on Windows 10