[wix-users] passing in multiple directories to Directory itemgroup to the HeatDirectory task

Rob Mensching rob at firegiant.com
Sun Jan 31 08:08:27 PST 2021


You're going to need to do Task batching because IIRC the HeatDirectory won't expand the ItemGroup for you. I _think_ (without testing) this will work better (notice the %(DirectoryRefId))

  <HeatDirectory *Directory="@(DirectoryItem)"* Transforms="Filter.xslt"
PreprocessorVariable="var.HarvestPath"
  OutputFile="myapp.g.wxs" ComponentGroupName="myapp.g.Outputs"
  DirectoryRefId="%(DirectoryRefId)" AutogenerateGuids="true"
ToolPath="$(WixToolPath)"
  SuppressFragments="true" SuppressRegistry="true"
SuppressRootDirectory="true" />


If you want an even simpler solution (albeit commercial), we (FireGiant) provide advanced harvesting technology that (IMHO) works way better: 
https://www.firegiant.com/wix/wep-documentation/harvesting/harvestfolder/


---
Short replies here. Complete answers here: https://www.firegiant.com/services/

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of John Zajac via wix-users
Sent: Saturday, January 30, 2021 5:06 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: John Zajac <jzajac2 at gmail.com>
Subject: [wix-users] passing in multiple directories to Directory itemgroup to the HeatDirectory task

following a snippet from this closed issue:
https://github.com/wixtoolset/issues/issues/6020

  <ItemGroup>
<DirectoryItem Include="somepath\bin\Release"> <DirectoryRefId>First</DirectoryRefId>
</DirectoryItem>
<DirectoryItem Include="somepath\bin\Release"> <DirectoryRefId>Second</DirectoryRefId>
</DirectoryItem>
<DirectoryItem Include="sompath\bin\Release"> <DirectoryRefId>Third</DirectoryRefId>
</DirectoryItem>
</ItemGroup>

Unable to figure out how to pass that into Directory param below in whatever format heat requires. If i were to hardcode multiple directories as  test - what would that look like so I don't get the:

heat.exe(0,0): error HEAT0001: The given path's format is not supported.
> error.



  <HeatDirectory *Directory="@(DirectoryItem)"* Transforms="Filter.xslt"
PreprocessorVariable="var.HarvestPath"
  OutputFile="myapp.g.wxs" ComponentGroupName="myapp.g.Outputs"
  DirectoryRefId="INSTALLFOLDER" AutogenerateGuids="true"
ToolPath="$(WixToolPath)"
  SuppressFragments="true" SuppressRegistry="true"
SuppressRootDirectory="true" />

If this is just me forgetting how item passing works in msbuild then I'll try to dust off the ole msbuild chops, but it's been years.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list