Web Deploy parameterization issue - xpath

I'm running into an issue with one of our Sitecore projects. The problem is that certain parameters won't get replaced... I've reproduced the issue in the GitHub repository shown below.
https://github.com/jopmiddelkamp/Web-Deploy-Parameters-issue
With the parameters.xml file below I'm trying to replace mail server values for the Sitecore EXM MAT.
<?xml version="1.0" encoding="utf-8" ?>
<parameters>
<parameter name="Mail Server" description="Mail server to enter into config" tags="Hidden,NoStore" defaultValue="__MailServer__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServer']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/server/text()" />
</parameter>
<parameter name="Mail Server User Name" description="Mail Server User Name to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerUserName__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerUserName']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/userName/text()" />
</parameter>
<parameter name="Mail Server Password" description="Mail Server Password to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerPassword__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerPassword']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/password/text()" />
</parameter>
<parameter name="Mail Server Port" description="Mail Server Port to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerPort__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerPort']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/port/text()" />
</parameter>
<parameter name="EXM Mail Server SSL or TLS Enabled" description="EXM Mail Server SSL/TLS enabled to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerSslOrTlsEnabled__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/startTls/text()" />
</parameter>
<parameter name="EXM Mail Server Authentication Method" description="EXM Mail Server Authentication Method to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerAuthenticationMethod__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//sitecore/exm/eds/smtpSettings/authenticationMethod/text()" />
</parameter>
</parameters>
This generates the SetParameters.xml file as shown below.
<?xml version="1.0" encoding="utf-8"?>
<parameters>
<setParameter name="IIS Web Application Name" value="ParametersTest" />
<setParameter name="Mail Server" value="__MailServer__" />
<setParameter name="Mail Server User Name" value="__MailServerUserName__" />
<setParameter name="Mail Server Password" value="__MailServerPassword__" />
<setParameter name="Mail Server Port" value="__MailServerPort__" />
<setParameter name="EXM Mail Server SSL or TLS Enabled" value="__MailServerSslOrTlsEnabled__" />
<setParameter name="EXM Mail Server Authentication Method" value="__MailServerAuthenticationMethod__" />
</parameters>
So far so good! I want the values to be replaced with the __placeholder__ structure so our VSTS release proces can replace those values with the right environment variables.
Now the problem is that on deployment the userName and password nodes won't get replaced in the \App_Config\Include\EmailExperience\Sitecore.EDS.Providers.CustomSmtp.config file. The result is shown below.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<exm>
<eds>
...
<smtpSettings type="Sitecore.EDS.Core.Net.Smtp.SmtpSettings, Sitecore.EDS.Core" singleInstance="true">
<server>__MailServer__</server>
<port>__MailServerPort__</port>
<userName></userName>
<password></password>
<authenticationMethod>__MailServerAuthenticationMethod__</authenticationMethod>
<startTls>__MailServerSslOrTlsEnabled__</startTls>
<proxySettings ref="exm/eds/proxySettings" />
</smtpSettings>
...
</eds>
</exm>
</sitecore>
</configuration>
This is weird because the xpath in the match attribute is exactly the same as the Mail Server Port parameter for example... I've also tried to update the parameters.xml file as shown below.
<?xml version="1.0" encoding="utf-8" ?>
<parameters>
<parameter name="Mail Server" description="Mail server to enter into config" tags="Hidden,NoStore" defaultValue="__MailServer__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServer']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='server']/text()" />
</parameter>
<parameter name="Mail Server User Name" description="Mail Server User Name to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerUserName__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerUserName']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='userName']/text()" />
</parameter>
<parameter name="Mail Server Password" description="Mail Server Password to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerPassword__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerPassword']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='password']/text()" />
</parameter>
<parameter name="Mail Server Port" description="Mail Server Port to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerPort__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\Sitecore\.Smtp\.config$" match="//sitecore/settings/setting[#name='MailServerPort']/#value" />
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='port']/text()" />
</parameter>
<parameter name="EXM Mail Server SSL or TLS Enabled" description="EXM Mail Server SSL/TLS enabled to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerSslOrTlsEnabled__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='startTls']/text()" />
</parameter>
<parameter name="EXM Mail Server Authentication Method" description="EXM Mail Server Authentication Method to enter into config" tags="Hidden,NoStore" defaultValue="__MailServerAuthenticationMethod__">
<parameterEntry kind="XmlFile" scope="App_Config\\Include\\EmailExperience\\Sitecore\.EDS\.Providers\.CustomSmtp\.config$" match="//*[local-name()='authenticationMethod']/text()" />
</parameter>
</parameters>
But this results in the same output... I can't find anything about any reserved names for the userName and password node names...
This is driving me crazy as I can't find a solution. Now I hope anyone here has experinced this issue before and knows how to solve it.
Kind regards,
Jop Middelkamp

Related

OpenNMS implement script to get status of any service

I am trying to implement script(sh, py..) that will get mi True(Up) of False(Down) status if my installed app on nodes is up-to-date.
Before that, i tried to implement simple script found on net (https://wiki.opennms.org/wiki/SystemExecuteMonitor) just to see if script works.
OpenNMS is installed on Windows 10.
This is what i did so far:
In poller-configuration.xml
`<service name="Test" interval="300000" user-defined="false" status="on">
<parameter key="script" value="/etc/scripts/test.sh"/>
<parameter key="banner" value="OK"/>
<parameter key="retry" value="3"/>
<parameter key="timeout" value="3000"/>
<parameter key="rrd-repository" value="/opt/opennms/share/rrd/response"/>
<parameter key="ds-name" value="test"/>
</service>`
AND
`<monitor service="Test" class-name="org.opennms.netmgt.poller.monitors.SystemExecuteMonitor"/>`
In default-foreign-source.xml
`<detector name="Test" class="org.opennms.netmgt.poller.monitors.SystemExecuteMonitor">
<parameter key="script" value="/etc/scripts/test.sh"/>
<parameter key="banner" value="OK"/>
<parameter key="retry" value="3"/>
<parameter key="timeout" value="3000"/>
<parameter key="rrd-repository" value="/opt/opennms/share/rrd/response"/>
<parameter key="ds-name" value="test"/>
</detector>`
And this is what i am missing: snmpd.conf
I don't have that file in OpenNMS, so my question is where should i call that script to be executed and do i miss anything else to get this working?
Thnx!
In the meantime, i've implemented groovy script like this:
In poller-configuration.xml
<service name="MinGroovy" interval="300000" user-defined="true" status="on">
<parameter key="file-name" value="C:/OpenNMS/etc/scripts/MinimalGroovy.groovy"/>
<parameter key="bsf-engine" value="org.codehaus.groovy.bsf.GroovyEngine"/>
<parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
</service>
AND
<monitor service="MinGroovy" class-name="org.opennms.netmgt.poller.monitors.BSFMonitor"/>
this is my groovy script:
#!/usr/bin/env groovy\
bsf_monitor.log("ERROR", "Starting MinimalGroovy.groovy", null);
filePath = "//netpath/output/temp.txt"
file = new File(filePath)
if (file.exists()){
return "OK";
}else{
return "NOK";
}
In groovy-starter.conf i added:
enter #lib for opennms
load ${opennms.home}/lib/*.jar
If i run script in groovy console, it works OK!
And this is the error i get in poller.log in OpenNMS:
ERROR [pool-9-thread-27] o.o.n.p.m.BSFMonitor: Starting MinimalGroovy.groovy
Any help?
Your service definition in the poller-configuration.xml looks suspicious to me:
<service name="MinGroovy" interval="300000" user-defined="true" status="on">
<parameter key="file-name" value="C:/OpenNMS/etc/scripts/MinimalGroovy.groovy"/>
<parameter key="bsf-engine" value="org.codehaus.groovy.bsf.GroovyEngine"/>
<parameter key="rrd-repository" value="/opt/opennms/share/rrd/response" />
</service>
The file name is located on "C:/..." whereas your rrd-repository is in "/opt/opennms". Do you have installed OpenNMS on Windows or Linux? The path to your groovy script in the service definition is from the OpenNMS process perspective.

Unable to send file in out directory WSO2 ESB

I have a simple vfs based proxy service. I want to poll file "DiscardedContracts.csv" and I want to add time with file name and move it to Out directory.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ContractsDiscardedFileReader"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="vfs">
<target>
<inSequence>
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
<log separator="==-------Going to move discarded contract file in out directory---------=="/>
<log level="custom" separator="==-------File--------==">
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
name="transport.vfs.ReplyFileName"/>
</log>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<send>
<endpoint name="FileEpr">
<address uri="vfs:file:///opt/file/contracts/Out/"/>
</endpoint>
</send>
</inSequence>
<faultSequence>
<sequence key="DeliveriesFileProcessingFaultSequence"/>
</faultSequence>
</target>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.CreateFolder">true</parameter>
<parameter name="transport.vfs.MoveAfterFailure">vfs:file:///opt/file/contracts/Fail</parameter>
<parameter name="sequential">true</parameter>
<parameter name="transport.vfs.LockReleaseSameNode">false</parameter>
<parameter name="transport.vfs.Build">false</parameter>
<parameter name="transport.vfs.MoveAfterProcess">vfs:file:///opt/file/contracts/Out/</parameter>
<parameter name="coordination">true</parameter>
<parameter name="transport.vfs.Streaming">true</parameter>
<parameter name="transport.PollInterval">30</parameter>
<parameter name="transport.vfs.FileURI">vfs:file:///opt/file/mysql</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<parameter name="transport.vfs.AutoLockRelease">false</parameter>
<parameter name="transport.vfs.FileSortAttribute">lastmodifiedtimestamp</parameter>
<parameter name="transport.vfs.FileSortAscending">true</parameter>
<parameter name="transport.vfs.DistributedLock">false</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.Locking">disable</parameter>
<description/>
</proxy>
But Problem is I am able to concat datetime with file name but file is not moving to Out directory properly. It create a response.xml Which contains my data. I don't know how file name and extension is changing. Need help, Thanks.
I believe this is because you have not set transport.vfs.ReplyFileName. (You have only logged it.) Its default value is response.xml.
If you take transport.vfs.ReplyFileName property out of the log mediator, it should work.
Ref: https://docs.wso2.com/display/ESB500/VFS+Transport
Update: Set scope="transport" to the property like below.
<property expression="fn:concat('DiscardedContracts', get-property('SYSTEM_DATE', 'yyMMddHHmmss'), '.csv')"
scope="transport"
name="transport.vfs.ReplyFileName"/>

MSDeploy setParameter not working

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 CRC checksum comparisons and (for the most part) it works just as well when using parameterisation to change applications web.configs depending on the environment we deploy to.
I have the majority of these parameters nailed down, but a few elements and attributes never seem to change, no matter how many different ways I call them in the parameters.xml file. I have outlined three examples of this, here is the web.config file I am trying to change:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="DbConnectionString" connectionString="Data Source=null;Initial Catalog=null;Trusted_Connection=no;User ID=user1;Password=pass*9;" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<customErrors mode="On" defaultRedirect="/Library/Error/PageNotFound.aspx">
</customErrors>
</system.web>
<applicationSettings>
<settings>
<setting name="service_Address" serializeAs="String">
<value></value>
</setting>
<settings>
</applicationSettings>
</configuration>
Here is the parameters.xml file:
<parameter name="DbConnectionString" defaultValue="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[#name='DbConnectionString']/#connectionString" />
</parameter>
<parameter name="customErrorsMode" defaultValue="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="configuration/system.web/customErrors/#mode" />
</parameter>
<parameter name="service_Address" defaultValue="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/applicationSettings/aim.Web.Properties.Settings/setting[#name='service_Address']/value" />
</parameter>
And here is the corresponding setParameters.xml file:
<setParameter name="DbConnectionString" value="Data Source=dbserver;Initial Catalog=DB1;Trusted_Connection=no;User ID=user1;Password=pass*9;"/>
<setParameter name="customErrorsMode" value="Off"/>
<setParameter name="service_Address" value="https://myservice.asmx"/>
I have tested each XPath expression and the results are the exact same as any of the other working parameters, but the above never seem to change.
Does anyone see anything obvious I'm missing here?
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:
<parameter name="DbConnectionString-Web.config Connection String" defaultValue="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[#name='DbConnectionString']" />
</parameter>
My setParameter definition should have looked like this:
<setParameter name="DbConnectionString-Web.config Connection String" value="Data Source=dbserver;Initial Catalog=DB1;Trusted_Connection=no;User ID=user1;Password=pass*9;" />

Configure WSO2 ESB JMS Transport with IBM Messagesight

I was wondering how to configure a JMS transport to work with IBM MessageSight, similar to: http://docs.wso2.org/display/ESB460/Configure+with+ActiveMQ
Right now, I have the following in axis2.xml:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">com.ibm.ima.jms.ImaJmsFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">tcp://192.168.154.128:1883</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
And I have something like this in an ESB proxy service:
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="esbProcessMqttJMSPS" statistics="disable" trace="disable" transports="ibmMsgSightJMS">
<parameter name="transport.jms.ConcurrentConsumers">1</parameter>
<parameter name="transport.jms.ConnectionFactory">myTopicConnectionFactory</parameter>
<parameter name="transport.jms.DestinationType">B</parameter>
<parameter name="transport.jms.Destination">B</parameter>
</proxy>
When I startup the ESB server, I get the following error: Cannot acquire JNDI context, JMS Connection factory : TopicConnectionFactory or default destination : null for JMS CF
Any help would be greatly appreciated. Thanks!
Okay so I figured this out.
The jms config in axis2.xml should be:
<transportReceiver name="ibmMsgSightJMS" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="myTopicConnectionFactory">
<parameter name="java.naming.factory.initial" locked="false">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
</parameter>
<parameter name="default">
<parameter name="java.naming.factory.initial">com.sun.jndi.fscontext.RefFSContextFactory</parameter>
<parameter name="java.naming.provider.url">file:/C:/path/to/wso2/repository/conf/jndi</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName">connFactory1</parameter>
<parameter name="transport.jms.ConnectionFactoryType">topic</parameter>
</parameter>
</transportReceiver>
And I have a jndi properties file named .bindings with the following:
connFactory1/ClassName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/FactoryName=com.ibm.ima.jms.impl.ImaConnectionFactory
connFactory1/RefAddr/0/Encoding=String
connFactory1/RefAddr/0/Type=Port
connFactory1/RefAddr/0/Content=16102
connFactory1/RefAddr/1/Encoding=String
connFactory1/RefAddr/1/Type=Server
connFactory1/RefAddr/1/Content=192.168.154.128
connFactory1/RefAddr/2/Encoding=String
connFactory1/RefAddr/2/Content=common
connFactory1/RefAddr/2/Type=ObjectType
RequestTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
RequestTopic/RefAddr/0/Encoding=String
RequestTopic/RefAddr/0/Type=Name
RequestTopic/RefAddr/0/Content=testRequestTopic
ResponseTopic/ClassName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/FactoryName=com.ibm.ima.jms.impl.ImaTopic
ResponseTopic/RefAddr/0/Encoding=String
ResponseTopic/RefAddr/0/Type=Name
ResponseTopic/RefAddr/0/Content=testResponseTopic
Also, don't forget to put the ImaJmsClient.jar inside components/lib.
I am still having issues where every service is creating topics/queues, and because they are not defined in .bindings, the server is puking. I have worked around this by removing the jms transport protocol on every data service and jar service.

MSBuild Paramaters.xml xpath appsettings file attribute

Im using msbuild to create a web deploy package using the parameters.xml file to replace web.config settings.
Im trying to replace the appsettings file attribute in web.config
This is my parameters.xml:
<parameter name="ClientConfig" description="Please enter the clients config file name." defaultValue="Niad.config" tags="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/appSettings/setting[#name='file']/value" />
</parameter>
This is my Web.config section:
<?xml version="1.0"?>
<configuration>
<appSettings file="Client.config">
</appSettings>
</configuration>
I know I'm writing the xpath match incorrectly, I was hoping someone could help me with the correct syntax.
This worked:
match="/configuration/appSettings/#file"
<parameter name="ClientConfig" description="Please enter the clients config file name." defaultValue="Niad.config" tags="">
<parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/appSettings/#file" />
</parameter>

Resources