How can the error "LNK4206 precompiled type information not found" be prevented in a solution with a shared precompiled header?
I try to configure a visual studio 2015 update 3 solution with all projects sharing the same precompiled header in an attempt to reduce build times. The precompiled header is in a separate project and constructs the .pch file and .lib file on a location accessible by the other projects in the solution (and other solutions). This reduced the build time for our main library from more then 10 minutes to less then 5 with comparable savings for other solutions.
However this also results in a problem with the precompiled header .pdb file as this file is being deleted by each project as a precompilation step. Suggested solutions on stackoverflow and on msdn for this problem is to copy the .pdb file as a precompilation step. However I couldn't get this to work (perhaps due to the copy step being executed before the automatic delete).
Alternative solution to fixing the pdb problem is setting the /C7 flag. For the debug build this results in a link warning warning LNK4206: precompiled type information not found; '...\msv\pch\x64\debug\stdafx.obj' not linked or overwritten; linking object as if no debug info'. This is not acceptable as indeed most debug information is missing during debug sessions. On msdn I found this article about the /Yi option but its not clear if this will resolve the problem (the LNK4206 is not mentioned) nor what the value of the symbol variable should be (must all missing symbols be added manually or just 1 arbitrary symbol)?
Any clues are welcome.