Quantcast
Channel: Configuration and Deployment
Viewing all articles
Browse latest Browse all 3561

MSDeploy not replacing encoded xml strings

$
0
0

I was redirected here from https://social.msdn.microsoft.com/Forums/en-US/472218ac-9959-4b87-81f0-a1fe83448c64/msdeploy-not-replacing-encoded-xml-strings?forum=msbuild

In web.config I have:

<applicationSettings><App.Properties.Settings><setting name="ProfitConnectorToken" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)"><value>__ProfitConnectorToken__</value></setting></App.Properties.Settings></applicationSettings>

In my parameters.xml:

<parameter name="ProfitConnectorToken" description="Description for ProfitConnectorToken" defaultvalue="__PROFITCONNECTORTOKEN__" tags=""><parameterentry kind="XmlFile" scope="\\web.config$" match="/configuration/applicationSettings/App.Properties.Settings/setting[@name='ProfitConnectorToken']/value/text()" /></parameter>

And in my SetParameters.xml:

<setParameter name="ProfitConnectorToken" value="&lt;token&gt;&lt;version&gt;1&lt;/version&gt;&lt;data&gt;XXXXXXXXXXXXXXXXXXXXXXXXX&lt;/data&gt;&lt;/token&gt;" />

But this value is not set when the web application is deployed. When I change my SetParameters.xml to:

<setParameter name="ProfitConnectorToken" value="TEST" />

It does work, so my XPath is correct. Why is the encoded xml value not set?


Viewing all articles
Browse latest Browse all 3561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>