使用HeatDirectory从wix中的多个目录中获取文件

Vic*_*jee 5 c# installation wix visual-studio-2010 heat

到目前为止,我这样做是为了从单个目录中收集文件:

<HeatDirectory DirectoryRefId="INSTALLFOLDER" OutputFile="references.wxs" 
  Directory="../MyProject/reference1" ComponentGroupName="ref1" 
  ToolPath="$(WixToolPath)" PreprocessorVariable="var.ref1" 
  AutogenerateGuids="true">
</HeatDirectory>
Run Code Online (Sandbox Code Playgroud)

如何使用HeatDirectory将多个目录中的文件收集到一个.wxs文件中,如下所示:

<HeatDirectory OutputFile="references.wxs" 
  Directory="directory1_Path|Directory2_Path|...." ComponentGroupName="ref1" 
  ToolPath="$(WixToolPath)" AutogenerateGuids="true">
</HeatDirectory>
Run Code Online (Sandbox Code Playgroud)

有没有办法做或我需要在我的wixproject文件中有多个HeatDirectory元素?

Rob*_*ing 9

HeatDirectory(顾名思义)一次只收获一个目录(以及可选的子目录).要获得两个目录根,您需要两个HeatDirectory元素.您还需要输出两个不同的.wxs文件,否则一个收获操作将覆盖另一个的输出文件.