I always run Visual Studio as an administrator. There are various reasons why this is necessary including:
- using IIS with a web application
- running web UI tests
- profiling
In fact there’s a list on MSDN of all the actions you require administrator permissions.
Here is a way to make sure Visual Studio always opens with elevated privileges, even if you double click on a .sln file. (I’m running Windows 8.)
- Right-click devenv.exe
- Select Troubleshoot program
- Check The program requires additional permissions
- Click Next
- Click Test the program…
- Wait for the program to launch
- Click Next
- Select Yes, save these settings for this program
- Click Close
If you have multiple versions of Visual Studio installed, you should repeat the operation for all of the following.
Program | Default location |
---|---|
Visual Studio 2008 | C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe |
Visual Studio 2010 | C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe |
Visual Studio 2012 | C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe |
VSLauncher.exe | C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe |
That’s it. Now Visual Studio always opens with administrator privileges.