I'm developing an application in Visual Studio which will require administrator permissions after it is installed on a user's system. I've added a proper application manifest file that will make sure this happens:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
However now if I want to debug the program in Visual Studio, I am required to run Visual Studio as an administrator. No bueno. And the most annoying part is that the program doesn't really need administrator privileges during debugging. It only requires those privileges after being properly installed on a user's system.
Is there a clean, easy way to "throw a switch" that disables the administrator requirement during development, and then re-enables it when I release the application?
EDIT:
When I release the application to the user, I run a build script which uses MSBuild. What I'm trying to do is make Visual Studio build a solution in the Release configuration without the administrator manifest. Then when I run my build script, I want to get MSBuild to include the administrator manifest while keeping the same Release configuration.