Force Visual Studio to run as administrator on Windows 10

The solution is simple:

1. Open the VS installation directory, find devenv.exe, right-click, and select "Compatibility Troubleshooting".

2. Select "Troubleshooter"

3. Select "This program requires additional permissions"

4. After confirming User Account Control, click Test Program, otherwise this dialog box won't let you click Next. It sucks, why not disable the next button?

5. After clicking "Test Program", VS will start with administrator privileges. now it's right.

6. Go back to the Compatibility Troubleshooter dialog, 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 an administrator:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325248211&siteId=291194637