【发布时间】:2011-06-28 19:07:54
【问题描述】:
我正在使用 msbuild 创建一个 web 部署包,使用 parameters.xml 文件替换 web.config 设置。
我正在尝试替换 web.config 中的 appsettings 文件属性
这是我的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>
这是我的 Web.config 部分:
<?xml version="1.0"?>
<configuration>
<appSettings file="Client.config">
</appSettings>
</configuration>
我知道我写错了 xpath 匹配,我希望有人可以帮助我正确的语法。
【问题讨论】:
-
/configuration/appSettings/@file
标签: visual-studio-2010 xpath msbuild msdeploy