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.
This is a known problem, which is fixed in VS 2010 SP1, apparently.
http://connect.microsoft.com/VisualStudio/feedback/details/544183/web-config-transform-writes-extra-line-break-spaces-to-values-elements-under-applicationsettings-section#
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With