Visual Studio failing to compile/link properly

I’ve been doing some heavy re-factoring on my application and have noticed that vc2010 will often say it has compiled and linked the program successfully when in fact it has not. If you find yourself debugging strange heap issues, or things that you know work then the first thing you should do is a ‘rebuild all’.

The problems manifested themselves in various ways from crashes during normal operation, failure of methods to return proper/known values etc. The software would run but it was full of time bombs. This has happened on at least 4 occasions in the last couple of days and wasted a significant amount of my time, while raising my blood pressure.

Rebuild All at the first sign of weirdness.