2

I have multiple installers under a Setup directory, which have been converted to wix v4 using wix convert. Each setup maps to a visual studio sln file with the same name. I was going to change our master build to use heat to harvest from our build directory, but I do not understand how to do that from the instructions. The documentation talks about adding nuget heat to all our projects, but that is not practical. I am hoping there is something like the old command line that points to a directory and builds the wxs file along with a transform. Right now I am not seeing that. How do I get this working?

Update

v3 documentation

v4 documentation

Ref 1 How to use HarvestDirectory in WiX 4

Ref 2 Explanation for Wix 4 Harvest Directory?

My args to heat in build file:

dir "binFiles"
HarvestDirectory Include="Folder/To/Harvest"

-dr BIN_FOLDER

-cg BinFilesGroup
ComponentGroupName BinFilesGroup

-t %edition%.xsl
HarvestProjectsTransforms edition.xsl

-gg
HarvestDirectoryAutogenerateGuids true

-g1
Not sure for wix 4 this deals with guid with no curly brace

-sf
HarvestFileSuppressFragments true

-srd
HarvestDirectorySuppressRootDirectory true

-scom
HarvestDirectorySuppressCom true

-sreg
HarvestDirectorySuppressRegistry true

-var var.BinFilesSourcePath
HarvestFilePreprocessorVariable var.BinFilesSourcePath

-out .\BinFiles.wxs Not sure yet how to specify output file

Add also BindPath Include="Folder/To/Harvest"

dgxhubbard
  • 703
  • 2
  • 7
  • 18
  • I don't believe you need to add the WixToolset.Heat NuGet package to all the projects that produce output, just to the project that builds your installer. You can specify all the locations to harvest in that project. – Ritmo2k May 18 '23 at 23:34
  • You are correct. I see that now – dgxhubbard May 18 '23 at 23:47

0 Answers0