Web配置转换是HTML编码的一些配置并将其破坏 [英] Web Config Transforms are HTML Encoding some of the config and breaking it

查看:106
本文介绍了Web配置转换是HTML编码的一些配置并将其破坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下内容:

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

Web.Config (this is a segment of an NLog configuration)

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

在使用发行版构建时,将其翻译为以下内容:

This is translated to the following when built with release:

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

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

As you can see the condition expression has been HTML Encoded resulting in the &gt; replacing the >. This causes the condition to not work.

在我的web.release.config文件中没有与此相关的任何东西,只需将其从基础web.config复制过来即可.

There is nothing specific to this within my web.release.config file, it is simply copied over from the base web.config.

如何抑制这种编码?

推荐答案

我已经与Microsoft交谈,他们要求我打开一个错误.

I have spoken to Microsoft and they have asked me to open a bug.

https://connect.microsoft.com/VisualStudio/feedback/details/797554/web-config-transforms-are-html-encoding-some-of-the-config-and-breaking-它

这篇关于Web配置转换是HTML编码的一些配置并将其破坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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