8 Sept 2020

Visual Studio Kept on rebuilding all projects without modifying anything

收藏到CSDN网摘

I noticed vs2013 started to rebuild all my projects and their dependencies even without any code change. Interestingly, the exact same project won't be compiled on Debug mode, which suggests some differences in the settings. By changing the Tools - Options, select Projects and Solutions - Build and Run, then set "MSBuild project build output verbosity" to Diagnostic. This will output the reason for building a project. I found that VS is looking for missing vc120.pdb, which was generated in Debug mode but not in Release. So the cure is very easy after pinning the nails down. In some cases, MSBuild looks for vc120.pdb in the output folder, and if this file doesn't exist, it will rebuild the entire project. This occurs even if you have disabled debug symbol generation. The workaround here is to enable debug symbols and let this file get generated, then disable the setting again without deleting the PDB file. Project properties - C/C++ - General - Debug information format needs to be set to: Programe database for edit and continue (/ZI) After compiling the project once to generate the vc120.pdb, it can be changed back to None for Release version as we don't need those information in it.


No comments :

Post a Comment