I have a fairly large VS2010 C++ solution. There is only one project in the solution so there are no inter-dependencies between projects. The problem is, when I pull an update from GIT, VS2010 is sometimes not smart enough to rebuild translation units that would be affected by the new files that were updated. This results in an executable that inevitably crashes in some bogus way.

This is painful for me because I cannot trust partial builds and end up having to do a full rebuild whenever i jump around in git which is killing productivity.

NOTE: I'm not blaming git in any way, I'm just pointing out my process in case it's relevant.
ALSO NOTE: When I build, i'm right clicking on the project and selecting "Build".

Does anyone know of a way to "debug" this compiler to know why it doesn't notice that it needs to rebuild other files that are dependent on the changes?

EDIT: Upon further investigation, I can rule out my use of GIT as a problem. I can reproduce this by editing a header file that's included in many many places, save it and then run a "Build" which doesn't want to build any new files.

EDIT 2: The issue appears to be related to #defines. I have a header that's only included in ANOTHER header...and it's only included in that header under some conditions which are specified by #defines. So we have #if COND1 #elif COND2 #else < the problem header in question #endif and that's broken. If i take the include out of the else case, it triggers dependencies to compile properly!