2011-06-28 14 views
0

msbuildを使用して、parameters.xmlファイルを使用してweb.config設定を置き換えるWeb展開パッケージを作成します。MSBuild Paramaters.xml xpath appsettingsファイル属性

イムこれは私のparameters.xmlあるweb.configファイル

でのAppSettingsファイルの属性を置き換えるしようとしている:私は

<?xml version="1.0"?> 
<configuration> 
<appSettings file="Client.config"> 
</appSettings> 
</configuration> 

<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セクションです私が誤ってxpathのマッチを書いているのを知って、誰かが正しい構文で私を助けてくれることを願っていました。

+2

/設定/のappSettings/@ファイルを – MHop

答えて

1

これが働いた:

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> 
関連する問題