Why is Visual Studio 2008 always rebuilding my whole project?

前端 未结 18 1806
栀梦
栀梦 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:55

    I had something similar. Even though I did have pre and post build events, they weren't causing the issue. It turned out that I had a number of projects down the reference chain that had content files that were marked as "copy always" instead of "copy if newer" meaning that these projects were always considered "out of date". By changing all of these to "copy if newer", changes to my unit test project no longer forced a recompile of all of the other projects.

提交回复
热议问题