如何关闭所有发布版本的 pdb 生成和 vshost [英] How to turn off pdb generation and vshost for all Release builds

查看:24
本文介绍了如何关闭所有发布版本的 pdb 生成和 vshost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我启动一个新软件时,我都必须进入配置并关闭 pdb 文件生成和发布版本的 Visual Studio 托管过程.有什么方法可以告诉 Visual Studio(特别是 2008)我想在剩下的时间里对所有项目都这样做吗?

Every time I start a new piece of software I have to go into the configuration and turn off pdb file generation and the Visual Studio hosting process for Release builds. Is there any way to tell Visual Studio (2008 specifically) that I want to do that for all projects for the rest of time?

推荐答案

经过一番挖掘,C# 的项目文件似乎存储在 program filesmicrosoft visual studio 9.0common7ideprojecttemplatescachecsharpwindows1033.通过将 false 添加到相关模板的正确部分(调试和发布配置有单独的部分),您可以关闭所有未来项目的托管过程选择的类型.

After some digging around, it appears that project files for C# are stored in program filesmicrosoft visual studio 9.0common7ideprojecttemplatescachecsharpwindows1033. By adding <UseVSHostingProcess>false</UseVSHostingProcess> to the correct sections (there are separate sections for Debug and Release configurations) of the relevant templates, you can turn off the hosting process for all future projects of the selected types.

您应该能够以类似的方式处理 PDB 问题,但正如我所说,我不建议将其关闭,因此我将其留作练习 :)

You should be able to handle the PDB issue in a similar way, but as I said I don't recommend turning those off, so I'll leave it as an exercise :)

这适用于VS2008,但我猜测其他版本也有类似的方案.其实VS2010也是用同样的方式,只是目录下的版本号明显是10.0而不是9.0.

This applies to VS2008, but my guess is that other editions have a similar scheme. In fact, VS2010 uses the same approach, but obviously the version number in the directory is 10.0 instead of 9.0.

这篇关于如何关闭所有发布版本的 pdb 生成和 vshost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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