views:

32

answers:

1

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.

+4  A: 

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.

Neil Barnwell
I always find it funny when I struggle with something for days and then seconds after submitting the question to SO I find the answer.
tster
+1 - for taking the time to post your conclusion.
ChrisBD
@tster Actually I posted the question and immediately answered it, because I'd already found the answer and thought it might be helpful. More helpful than the chaps on Connect, anyway. :)
Neil Barnwell