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.
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.
Go to the configuration manager, and change Debug->Mixed CPU to Debug->Any CPU, I had resolved mine with the same option.
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With