Why is Visual Studio 2008 always rebuilding my whole project?

前端 未结 18 1846
栀梦
栀梦 2021-02-05 18:22

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

18条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 18:42

    A reason is if the 'date last modified' for one of the source file is set for some date in the future: it rebuilds, and then the source file is still later than the executable.

    This problem with the dates can happen if the source file is located in a directory a remote machine (a network share), and/or may even happen if your machine's time isn't synchronised with the date of the machine which is running the server of your source version control system.

提交回复
热议问题