Post-Build Event on Run (F5) In Visual Studio?
visual-studio, visual-studio-2010
Solution
Postbuilds are only run after building. So when your build artifacts are up to date, it will not build and postbuilds will not run.
If it even won't run when it has to build, check the following:
In Visual Studio look at Tools -> Options -> Projects and Solutions -> Build an Run.
Is the option "Only build startup projects and dependencies on Run" checked?
Try to uncheck that option.
What is the value of the option "On Run, when projects are out of date"? It should be "Prompt to build" or "Always build" to be sure to trigger a build when pressing F5.
Problem
I have a post-build event set up in Visual Studio 2010. The problem I am having is that the event doesn't run when I use Run (F5) to start debugging--it only seems to run if I explicitly Build (F6). This seems to happen even when source files have changed (so it must build in order to run). Is there a setting that controls this behavior?