开发者

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 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜