views:

754

answers:

1

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.

+5  A: 

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.

Michael Burr
Excellent! I never knew that was there.
flipdoubt
Here is a follow up question: Does setting the "Debug Info" to pdbonly change the setting for just the current configuration (i.e., Release) or all configurations?
flipdoubt
I honestly don't know - I'd assume it would affect only the current configuration, but I'd have to try it out to be sure. At the moment, I don't have the time.
Michael Burr