Thursday, November 1, 2012

F5 not building before running in Visual Studio 2012

I recently started using Visual Studio 2012 but got quite annoyed after I realized that the F5 shortcut was not building the projects in my solution before actually running them. Because of this, I was ending up with inconsistencies between the running application the source code.

Long story short, here's how to fix this.

Open the Options box from Debug > Options and Settings, then from Projects and Solutions > Build and Run, make sure that the dropdown for On Run, when projects are out of date:, the "Always build" value is set: