为什么Visual Studio 2008总是重建我的整个项目?

问题描述:

我有一个带有约60个C ++源文件的Visual Studio项目.我可以进行构建,并且可以毫无错误地完成构建.但是,如果我立即再次按下F7,它将始终重新编译大约50个源文件.它不会重新编译所有文件,这很奇怪.

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.

我设置了启用最小重建"(/Gm).任何想法为什么会这样做呢? 这些文件的将来都没有修改日期".

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.

您将来是否有文件日期?如果您更改了时区或更改了系统时钟时间,可能会发生这种情况.将来的日期会混淆IDE,并在每次按F7或F5时强制进行重新构建.

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.