MSDeploy setParameter not working

前端 未结 1 1644
执念已碎
执念已碎 2021-02-19 18:06

We are trying to integrate a \'build once, deploy anywhere\' model in our build-deploy system.

MSDeploy works wonders for this, cutting down build time dramatically with

1条回答
  •  忘了有多久
    2021-02-19 18:48

    service_Address

    I found the answer to this problem here:

    Replace web.config elements with MSDeploy

    I was missing 'text()' at the end of the XPath expression, the correct XPath is:

    /configuration/applicationSettings/aim.Web.Properties.Settings/setting[@name='ai‌​m_Web_AddressService_Address']/value/text()
    


    customErrorsMode

    For the customErrorsMode problem, I was missing a '/' at the start of my XPath expression. The correct expression is:

    /configuration/system.web/customErrors/@mode  
    


    connectionStrings

    This one really got to me, it was the last one I figured out. After doing a bit of digging I found out that MSDeploy automatically parameterizes certain elements, connection string being one of them, more info here:

    Configuring Parameters for Web Package Deployment

    My parameter declaration for the connection string in question should have been:

    
        
    
    

    My setParameter definition should have looked like this:

    
    

    0 讨论(0)
提交回复
热议问题