Visual Studio 2010 isn't building before a run when there are code changes

Solution 1:

Tools + Options, Projects and Solutions, Build and Run. "On Run, when projects are out of date" = Always build. The one below that = Do not launch.

Solution 2:

I had this problem and it turned out to be the Configuration Manager. I had recently changed from Debug|Mixed CPU to Debug|Any CPU and the project wasn't set to build under this configuration

Solution 3:

open your configuration manager and check out if the checkbox in the build column for your startup project is checked. I had the same problem, but the checkbox wasn't active, so i checked it and now it works!