I\'m trying to set the preprocessor variable in wix and i\'m unable to find an example of this or explanation on how to do it anywhere on the internet, i\'m hoping somebody
I created an example project on GitHub showing how to successfully use the HarvestDirectory target, which is a higher-level thing that calls the HeatDirectory task. You don't need to directly call the HeatDirectory task yourself. You can see all of the example code here:
https://github.com/DavidEGrayson/wix-example-harvest-directory
Here are the most important parts:
foo.wixproj
1.0.0
ProductVersion=$(ProductVersion);ItemDir=items
Debug
x86
27e80d9b-d8b6-423a-a6ff-1d9c5b23bb31
2.0
foo-$(ProductVersion)
Package
false
$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets
bin\$(Configuration)\
obj\$(Configuration)\
Debug;ProductVersion=$(ProductVersion)
bin\$(Configuration)\
obj\$(Configuration)\
ItemDir
Items
var.ItemDir
foo.wxs
Foo package.
Foo Inc.
https://www.example.com/