Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Occasionally, I find I encounter issues when working in Visual Studio 2015 that are fixed by running it as an Administrator.

On my Desktop (Windows 10 Pro), I have created a shortcut to Visual Studio, and I have ticked Properties | Advanced | Run As Administrator, which works fine.

I have just created a shortcut to the *.sln file for a project I am currently working on. This opens the solution in Visual Studio no problem, but I am unable to tick the same option as above to get it to run as Administrator. The option is simply greyed-out?

Does anyone know why this may be and if I can change this?

Kind wishes ~ Patrick

What I have tried:

Tried looking in the Security properties for the shortcut. I have full privileges.
Posted
Updated 8-Mar-16 23:11pm
v3

1 solution

You can only set executables as "run as Admin", so you need to create a new shortcut, and point it at the EXE file. Add the path to the solution as a parameter to teh exe, and set the "start in" folder to the solution folder.
Then you can set the "Advanced" option to "run as Admin".
So for me:
Target:
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" "D:\Documents\AA Backed Up\My Projects\SMApplications\SMApplications.sln"
Start in:
"D:\Documents\AA Backed Up\My Projects\SMApplications"
 
Share this answer
 
Comments
Patrick Skelton 9-Mar-16 5:17am    
Outstanding, sir! Thank you very much.
OriginalGriff 9-Mar-16 5:21am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900