【问题标题】:publish application in release mode and automatically set debug to false以发布模式发布应用程序并自动将调试设置为 false
【发布时间】:2013-03-19 00:00:09
【问题描述】:

在发布我的项目之前,我需要将其设置为发布模式,并在 web.config 文件中将调试标志设置为 false。如果定义了发布符号,有没有办法使用预处理器指令将调试标志设置为 false?

【问题讨论】:

    标签: c# .net asp.net-mvc


    【解决方案1】:

    【讨论】:

    • <system.web><compilation targetFramework="4.5" xdt:Transform="Replace" /></system.web> 添加到 Web.Release.Config 有效。
    • <compilation xdt:Transform="RemoveAttributes(debug)" /> 也可以。
    猜你喜欢
    • 1970-01-01
    • 2018-10-30
    • 2014-03-31
    • 1970-01-01
    • 1970-01-01
    • 2014-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多