配置管理器仅显示调试 [英] Configuration Manager only shows Debug

查看:173
本文介绍了配置管理器仅显示调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2008中工作在已部署到测试服务器的ASP.NET应用程序。我想要一个没有调试信息的生成放置在生产中,但配置管理器只显示在我的项目的配置下拉菜单中的调试。

I am working in Visual Studio 2008 on an ASP.NET application, which has been deployed to a test server. I would like to make a build without debug information to place in production, but the configuration manager only shows "Debug" in the configuration dropdown for my project.

我的其他视觉Studio项目显示调试,释放,新建...和编辑...。

My other Visual Studio projects show "Debug", "Release", "New...", and "Edit...".

为什么看不到发布选项,或新的和编辑命令?

Why do I not see a release option, or the new and edit commands?

推荐答案

ASP.NET网站不使用配置管理器来确定是否包括调试信息在编译。您必须将其设置在 web.config 文件中。

ASP.NET web sites do not use the configuration manager to determine if debug information is included in the compile. You must set it in the web.config file. Visual Studio will never change debug to "false" for you automactially, as far as I know.

web.config

Find this section in your web.config file and change it to "false":

<!--
    Set compilation debug="true" to insert debugging
    symbols into the compiled page. Because this
    affects performance, set this value to true only
    during development.
-->

<compilation debug="true">

Visual Studio会询问您是否希望在运行网站时将其从false更改为true在IDE中,但不幸的是它不会反向发布(这对我来说更重要)。

Visual Studio will ask you if you want it changed from false to true if you are running your web site in the IDE, but unfortunately it does not do the reverse for publishing (which seems more important to me).

如果您的解决方案中有多个项目,其中一个支持发布配置(例如DLL) - 它将出现在配置下拉列表中。但是,选择发布版本的建设仍然不会影响网站。

If you have multiple projects in your solution, and at least one of them supports a release configuration (such as a DLL) - it will appear in the configuration drop-down list. Building with Release selected still does not affect the website, however.

这篇关于配置管理器仅显示调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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