问题
I have a solution containing several projects that have migrated from VS 2003, 2005, 2008. When compiling all the projects for the RELEASE configuration, VS 2008 creates PDB files for some projects, but not others. Why?
In the Build tab of the Properties page for each project, I can see they all have "Define DEBUG constant" unchecked and "Optimize code" checked. When I inspect the CSPROJ for each project, I do not notice any differences that look like they would change this behavior. What should I be looking for in the CSPROJ files?
All the projects in this solution produce class libraries except for one project that creates a Windows executable.
回答1:
The setting is controlled in VS 2008 for C# projects in the "Build/Advanced Build Settings/Debug Info" setting. It's somewhat hidden - you have to press the "Advanced..." button to get the setting to show.
It corresponds to the /debug:pdbonly
option for the csc.exe
command line compiler.
来源:https://stackoverflow.com/questions/291214/why-does-vs-2008-create-pdbs-for-some-release-projects-but-not-others