So, I was having the same problem with one of our projects. First, I was able to debug the compiler output by selecting:
-> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity -> Detailed.
It turned out that someone had set the project to always create precompiled headers for all files (/Yc). I changed the option as listed below.
-> Configuration Properties -> Precompiled Header -> Use (/Yu)
Then I set the same option for stdafx.cpp to (/Yc). So compilation of the stdafx.cpp creates the precompiled header, and all the other .cpp files use the precompiled header. This is the default scenario, and I'm not sure how it had changed for out project.
Additionally, I have changed all our compiler settings to be consistent across all projects, including:
1) Setting: C/C++ -> Precompiled Headers -> Precompiled Header -> Use (/Yu)
Switch: /Yu
Reason: Faster build time.
2) Setting: C/C++ -> General -> Debug Information Format -> Program Database for Edit and Continue
Switch: /ZI
Reason: Enables edit-and-continue, thereby improving debugging capability.
3) Setting: C/C++ -> Code Generation -> Enable Minimal Rebuild -> Yes
Switch: /Gm
Reason: Allow and speed up incremental builds and this is required for /ZI.
Hope that helps. I spent a lot of time messing with our project build settings and reading posts to Stack Overflow, and in the end, I miss C#.