为什么VS 2008为某些RELEASE项目而不是其他项目创建PDB? [英] Why does VS 2008 create PDBs for some RELEASE projects but not others?

查看:72
本文介绍了为什么VS 2008为某些RELEASE项目而不是其他项目创建PDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个解决方案,其中包含从VS 2003、2005、2008迁移的几个项目。在为RELEASE配置编译所有项目时,VS 2008为某些项目创建PDB文件,但为其他项目创建PDB文件。为什么?

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?

在每个项目的属性页面的构建选项卡中,我可以看到它们均未选中定义DEBUG常量和优化代码。当我检查每个项目的CSPROJ时,我没有发现任何看起来会改变此行为的差异。我应该在CSPROJ文件中寻找什么?

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?

此解决方案中的所有项目都产生类库,除了一个创建Windows可执行文件的项目。

All the projects in this solution produce class libraries except for one project that creates a Windows executable.

推荐答案

在VS 2008中,对于C#项目,在构建/高级构建设置/调试信息设置中控制该设置。它有点隐藏-您必须按下高级...按钮才能显示设置。

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.

它对应于 / debug :pdbonly 选项用于 csc.exe 命令行编译器。

It corresponds to the /debug:pdbonly option for the csc.exe command line compiler.

这篇关于为什么VS 2008为某些RELEASE项目而不是其他项目创建PDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆