Visual Studio: Some files not recompiled - how to debug ?


in one of my projects it happens from time to time that when building with Visual Studio (not Code), I get linker errors, because some cpp files have not been recompiled.
So it seems that after a header was edited, some cpp files were not recompiled, although they use that header indirectly.
How are those dependencies handled in Visual Studio projects, where can I start looking ?
Do you have suggestions how to debug this issue ?

Thanks in advance

With Visual Studio generators the underlying build system is MSBuild. One can run cmake --build . --config Debug -- -v:diag to pass the -v:diag option to MSBuild, which prints very verbose information about its decisions.