Web Config Transforms are HTML Encoding some of the config and breaking it

别来无恙 提交于 2019-12-11 19:42:14

问题


I have the following:

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>

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

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

How can I suppress this encoding?


回答1:


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-it



来源:https://stackoverflow.com/questions/18225737/web-config-transforms-are-html-encoding-some-of-the-config-and-breaking-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!