Last Updated: December 26, 2018
· kusold

Always launch Visual Studio as Administrator

When developing for Sharepoint, in order to deploy you need to run Visual Studio in Administrator mode. To make this the default behaivor:

  1. Right click on the shortcut (works from the start menu too)
  2. Switch to the compatibility tab
  3. Click Change settings for all users Picture
  4. Select Run this program as an administrator Picture
  5. Ok
  6. Ok

And you are done.

EDIT: In order to launch VS as Admin when opening solutions in Windows Explorer, please see Wimbo's comment.

3 Responses
Add your response


I'll add that this is useful for Azure development as well. (At least the last time I played with that SDK)

over 1 year ago ·

This is not completely correct.
The VSLauncher manifest must also be altered or double-clicking a .sln file won't do anything.
Altering the manifest file is easy enough: open the VS2010 Tools Command Prompt (As Administrator) and go to the dir where VSLAUNCHER.exe is located, then type
mt -inputresource:"VSLauncher.exe" -out:VSLauncher.exe.manifest
This will export the manifest file (xml) wherein you should change the value of requestedExecutionLevel attribute "level" from "asInvoker" to "requireAdministrator". Save the file and re-import it using:
mt -outputresource:VSLauncher.exe -manifest VSLauncher.exe.manifest
If the UAC popup bothers you, you can change its settings from within the popup itself or from within Control Panel > User Accounts > User Accounts > Change User Account Control Settings.

over 1 year ago ·

Thanks @Wimbo. I rarely launch solutions from Windows Explorer so I wasn't aware of this.

over 1 year ago ·