This process is as easy as it comes and totally defies a famous quote.
Easier said than done!
I use Visual Studio Ultimate 2013 therefore, this small snippet is the follow up I did after adding this feature in one of my personal project. Forcing administrative privilege requirement on an application built using .NET frameworks sounds quite difficult or do the lengthy way,
Right Click > Run as Administrator.
In order to achieve this, you should modify the default manifest file which the Visual Studio generates during the compile process.
- Right Click on your Project (in Visual Studio).
- Add or (Press
Ctrl + Shift + A)
- New Item.
- Application Manifest File (Leave the name as it is,
- Uncomment the line or copy and paste it outside the comment.
app.manifest default layout should be like this
Add the following line in your
app.manifest file nested inside
<asmv1:assembly manifestversion="1.0"> and
That is all, save your project, compile and build your application and the difference you will see in the output file will be something like ..