views:

44

answers:

1

When my Web.config transforms it is adding a new line before the end value tag in my ApplicationSettings. This new line is showing up in the setting and causing an exception. Example:

Web.config:

        <setting name="FilePath" serializeAs="String">
            <value>c:\path</value>
        </setting>

Web.Debug.config:

        <setting name="FilePath" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)">
            <value>c:\path</value>
        </setting>

Published Web.config:

        <setting name="FilePath" serializeAs="String">
            <value>c:\path
            </value>
        </setting>

The end value tag being on its own line is causing problems. Does anyone know how to get it to stop doing this? Thanks.

A: 

No idea, but you could trim the string before you use it in the application...

Kendrick