0
我正在使用WiX開發安裝項目,並且遇到以下問題。我從使用瀏覽對話框的用戶那裏得到一個目錄路徑,我需要把這個路徑放在web.config
。問題在於web.config
將值放在「WWWMain」中,而不是用戶選擇的路徑。從瀏覽對話框中使用WiX屬性
這是我的代碼:
Product.wxs
<Property Id="IISLOGDIRECTORY" Value="WWWMain" />
Dialog.wxs
<Control Id="IISLogDirectoryEdit" Type="PathEdit" X="45" Y="100" Width="220" Height="18" Disabled="yes" Property="IISLOGDIRECTORY" Indirect="yes" />
Installation.wxs
<util:XmlFile Id="ModifyIISLogDirectory"
Action="setValue"
Permanent="yes"
ElementPath="/configuration/appSettings/add[\[]@key='isslogdirectory'[\]]/@value"
File="[INSTALLLOCATION]Web\Web.config"
Value="[IISLOGDIRECTORY]"/>
問題是概念上的,從而使該路徑將被正確保存在web.config中,因爲該值必須放在[WWWMain] – camaya