Parameters.xml transform not working for AppVeyor agent deployment

ben's Avatar

ben

18 Jun, 2017 05:52 AM

I've tried seemingly endless combinations of parameters.xml and appveyor environment settings but can't seem to get the transform to work. My current solution after scouring all of the other support discussions related to this (as we as the rets of the internet!) is as follows:

Web.config (this is with local dev settings in):

  <connectionStrings>
    <add name="ApplicationServices" connectionString="Data Source=.;Database=ApplicationServices;Integrated Security=True" />
    <add name="CViewClient" connectionString="Data Source=.;Database=CView{0};Integrated Security=True" />
  </connectionStrings>

Parameters.xml:
<parameters>
<parameter name="ApplicationServices" defaultValue="">
    <parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[@name='ApplicationServices']" />
</parameter>
<parameter name="CViewClient" defaultValue="">
    <parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[@name='CViewClient']" />
</parameter>
</parameters>

And appveyor environment settings as per attached screen shot.

I'm sure I've done something really stupid but for the life of me I can't figure out what it is!

  1. 1 Posted by ben on 18 Jun, 2017 05:53 AM

    ben's Avatar

    Removed as edited original post instead.

  2. 2 Posted by ben on 19 Jun, 2017 12:16 AM

    ben's Avatar

    Just to add to this! My app setting transforms that are all in the same file seem to work fine which makes me think it's due to my xpath!

  3. 3 Posted by ben on 19 Jun, 2017 12:30 AM

    ben's Avatar

    OK hold the phone I cracked it after re-reading the following two posts over and over again:

    https://stackoverflow.com/questions/24428870/msdeploy-setparameter-not-working
    http://help.appveyor.com/discussions/problems/1759-webconfig-using-web-deploy

    Basically what I can tell is web deploy auto looks for the connection strings based on a naming convention (I think)!

    So changing the name of my parameters to the below fixed everything:

    ApplicationServices-Web.config Connection String
    CViewClient-Web.config Connection String

  4. ben closed this discussion on 19 Jun, 2017 12:30 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

19 Oct, 2017 02:25 AM
18 Oct, 2017 07:26 PM
18 Oct, 2017 11:00 AM
18 Oct, 2017 08:54 AM
18 Oct, 2017 07:42 AM

 

17 Oct, 2017 07:36 PM
17 Oct, 2017 05:39 PM
17 Oct, 2017 04:29 PM
17 Oct, 2017 07:49 AM
16 Oct, 2017 11:38 PM
16 Oct, 2017 10:01 PM