Table of Contents



Scenario

When clicking on a .sln file in Windows Explorer, Visual Studio 2015 opens without Administrator rights, required for BizTalk Server deployment.  Visual Studio needs to be executed "As Administrator" for GAC deployment to work.

Environment

This article was prepared considering a freshly built development machine running Windows 10, with Visual Studio 2015 installed. 

Solution

To make Visual Studio open "As administrator" when clicking on .sln files in Windows Explorer VSLauncher.exe needs to be configured to run "As administrator".

  1. - Navigate to "C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv" in Windows Explorer.
  2. - Right click VSLauncher.exe, go to properties, compatibility Tab.
  3. - In the Settings section, check the "Run this program as  an administrator" checkbox. Click OK.


Now Visual Studio opens as Administrator when an .sln file is opened from Windows Explorer.

Additionally, a shortcut should be created for when Visual Studio is to be opened directly, without selecting an .sln file from Windows Explorer:

  1. .Right click Visual Studio in the Start Menu and select "Pin to taskbar".
  2. Right the newly created shortcut on the taskbar.
  3. On the "Shortcut" tab, click the "Advanced" button.
  4. Check the "Run as administrator" checkbox and click "OK" twice.


Now Visual Studio opens as Administrator when using the taskbar shortcut.