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 incor开发者_如何转开发rectly, 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>
精彩评论