Why is Visual Studio 2008 always rebuilding my whole project?

Rocketmagnet picture Rocketmagnet · Jun 20, 2009 · Viewed 17.8k times · Source

I have a Visual Studio project with about 60 C++ source files. I can do a build, and it completes without errors. But if I immediately hit F7 again, it always re-compiles about 50 of the source files. It doesn't re-compile all of the files, which is strange.

I have 'Enable minimal rebuild' (/Gm) set. Any ideas why it might be doing this? None of the files have a Modified Date in the future.

Answer

Robert Harvey picture Robert Harvey · Jun 20, 2009

Are any of your file dates in the future? This can occur if you changed time zones or changed the system clock time. Dates in the future will confuse the IDE and force a rebuild every time F7 or F5 is hit.