1
我有一個由幾個片段組成的Wix項目。其中一個片段具有數據庫組件,另一個片段具有處理xml文件的組件。Wix XmlFile保持SqlDatabase無法創建數據庫
當我包含XmlFile元素來操縱文件時,不會創建由SqlDatabase定義的數據庫。如果我註釋掉XmlFile,那麼數據庫就會被創建。
下面是與片段兩個威克斯文件正在使用:
數據庫:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Id="Database1Creation" Guid="GUID_HERE">
<sql:SqlDatabase Id="Database1"
Server="[DATABASE_SERVER]" Database="[DATABASE_NAME]"
CreateOnInstall="yes" ConfirmOverwrite="no"
DropOnUninstall="yes">
</sql:SqlDatabase>
</Component>
</DirectoryRef>
</Fragment>
</Wix>
XML操作:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="MyDirectory">
<Component Id="ServiceExecutables" Guid="GUID_HERE">
<File Id="File1" Name="File1.xml" Source="Source/File1.xml" />
<util:XmlFile Id="UpdateFile1" File="[INSTALLDIR]File1.xml" Action="setValue" ElementPath="//SomeContainer/SomeElement" Value="[SOME_VALUE]" />
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
</Wix>
但是也有一些還安裝了其他東西,但他們似乎沒有任何影響(我已經刪除了其他所有內容並測試了安裝)。
使用XmlFile查看安裝日誌時,如果沒有,它們幾乎是彼此完全相同的副本,只不過SqlDatabase調用完全缺失,並且XmlFile調用將處於其位置。
這裏有一個已知的錯誤嗎?還是我在做我不該做的事?這不是我們的應用程序的殺手,因爲我可以將我放入xml文件的東西移動到註冊表中,但我寧願不這樣做。
我正在使用Wix 3.5。
相同。該死的。事情。在郵件列表中? https://lists.sourceforge.net/lists/listinfo/wix-users – Will 2010-04-12 18:05:25
https://sourceforge.net/tracker/?func=detail&aid=2986062&group_id=105970&atid=642714 – Will 2010-04-12 19:00:12
狗屎,我也認爲它可以防止FirewallException運行以及!!! – Will 2010-04-22 13:04:15