【问题标题】:Web Config Transforms are HTML Encoding some of the config and breaking itWeb Config Transforms 是对一些配置进行 HTML 编码并破坏它
【发布时间】:2013-08-14 07:34:37
【问题描述】:

我有以下几点:

Web.Config(这是 NLog 配置的一部分)

<target name="fileAsException" 
        xsi:type="FilteringWrapper" 
        condition="length('${exception}')>0">
    ... removed ...
</target>

当使用 release 构建时,这会被翻译成以下内容:

<target name="fileAsException" 
        xsi:type="FilteringWrapper" 
        condition="length('${exception}')&gt;0">
    ... removed ...
</target>

如您所见,condition 表达式已经过 HTML 编码,导致 &amp;gt; 替换了 &gt;。这会导致条件不起作用。

在我的web.release.config 文件中没有任何特定的内容,它只是从基础web.config 复制过来的。

如何抑制这种编码?

【问题讨论】:

    标签: web-config msdeploy xdt-transform publish-profiles web.config-transform


    【解决方案1】:
    猜你喜欢
    • 2014-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-15
    • 2014-06-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多