I want my visual studio project to require admin privileges when it is launched, how do you do that? I've tried going on "properties -> Project properties -> linker -> manifest file" and changing the UAC execution level to "requireAdministrator (/level=requireAdministrator'')" but visual studio just gives me error MSB6011 while building the project. All help is appreciated. Thanks
Asked
Active
Viewed 1,697 times
1
-
1Does this answer your question? [How do I force my .NET application to run as administrator?](https://stackoverflow.com/questions/2818179/how-do-i-force-my-net-application-to-run-as-administrator) – Michael Chourdakis Feb 16 '20 at 21:09
-
@mic: Isn't that exactly what the OP is doing already? – IInspectable Feb 17 '20 at 08:23
1 Answers
1
I tried to reproduce your problem, but it didn't work.
I guess it might be something wrong with vs. I suggest that you could try to restore the settings of VS and try again, about restoring the settings of VS: Tools->Import and Export Settings...->Reset all Settings->Next->"No, just reset settings, overwriting my current settings"->Next->General->Finish.
I suggest you can try to clear the cache of VS.VS cache cleanup steps:
- Close Visual Studio (ensure devenv.exe is not present in the Task Manager)
- Delete the %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache directory (2017 correspondence 15.xxx, 2019 correspondence 16.xxx, 2015 correspondence 14.xxx )
- Restart Visual Studio.
If the problem persists,I suggest you could try to open the build log function and take a look at the build process.

Jeaninez - MSFT
- 3,210
- 1
- 5
- 20