MSDeploy not replacing encoded xml strings RRS feed

  • Question

  • In web.config I have:

    		<setting name="ProfitConnectorToken" serializeAs="String" xdt:Transform="Replace" xdt:Locator="Match(name)">

    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()" />

    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?

    Thursday, June 8, 2017 10:09 AM

All replies

  • Hi David,

    Thanks for posting here.

    This forum is about the MSBuild (Usage of MSBuild, build customization, and MSBuild extensibility via tasks, loggers and hosting), as your issue is more related to the ASP.Net configuration and deployment, we suggest you can submit this question on this forum for better support.

    If you have some MSBuild questions, please feel free to contact us. We will try our best to give you a solution.

    Thanks for your understanding and cooperation.

    MSDN Community Support Please remember to click &quot;Mark as Answer&quot; the responses that resolved your issue, and to click &quot;Unmark as Answer&quot; if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, June 9, 2017 9:18 AM