配置管理器仅显示调试

编程入门 行业动态 更新时间:2024-10-24 18:28:08
本文介绍了配置管理器仅显示调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在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.

更多推荐

配置管理器仅显示调试

本文发布于:2023-11-08 11:15:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569213.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:管理器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!