我希望WiX首先为.NET 3.5安装MSChart,这是ExePackage。目前,它总是安装它,即使它已经存在。我通过查看MSChartInstalled FileSearch
<Bundle ... etc.>
<Chain>
<ExePackage Id="mschart" SourceFile="MSChart.exe"
DetectCondition="MSChartInstalled"
Permanent="yes"
/>
<MsiPackage SourceFile="..\Setup\bin\Release\Setup.msi" />
</Chain>
</Bundle>
<Fragment>
<util:FileSearch
Id='SearchForMSChart'
Variable="MSChartInstalled"
Result="exists"
Path="[ProgramFilesFolder]Microsoft Chart Controls\Assemblies\System.Windows.Forms.DataVisualization.dll"
/>
</Fragment>
答案 0 :(得分:1)
答案是使用引用将片段放入包中:
<bundle ... >
...
<util:FileSearchRef Id="SearchForMSChart"/>
...