0

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.

1
  • 2
    /configuration/appSettings/@file Commented Jun 28, 2011 at 19:34

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.