Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 Not Always Building Before Debugging

I have had a problem where VS2010 will not build my projects before debugging. Even when they have never been built before (i.e. on a fresh checkout from source control).

I will either find I am stepping through on the wrong lines of code (because the symbols are out of date), or an error message if there is no build output (bin\debug folder is empty).

Performing a build manually before debugging is the workaround.

like image 789
Neil Barnwell Avatar asked Jul 14 '10 11:07

Neil Barnwell


3 Answers

I'm answering this myself, so that Stack Overflow can be the canonical answer to this problem in case someone else experiences the same thing.

Essentially it's a VS configuration issue. Navigate to the options as follows:

Tools->Options->Projects and Solutions->Build and Run->On Run, when projects are out of date:

and make sure it is set to "Always Build" if it is not already.

Hope this helps someone, it's caused me a lot of trouble for weeks now.

like image 194
Neil Barnwell Avatar answered Oct 17 '22 00:10

Neil Barnwell


Go to the configuration manager, and change Debug->Mixed CPU to Debug->Any CPU, I had resolved mine with the same option.

like image 37
Ravi Raj Avatar answered Oct 17 '22 01:10

Ravi Raj


What resolved the problem for me was going to the configuration manager and making sure the "Build" checkbox was checked. In my case, it had somehow become un-checked:

enter image description here

like image 1
rory.ap Avatar answered Oct 17 '22 00:10

rory.ap