Question

I generate setup file list using heat.exe but I can't find out how I can use it in my wix setup project.

Can I import output file to my setup project?

Was it helpful?

Solution

MSBuild supports using wildcards (**, * and ?) to specify a group of files as inputs instead of listing each one separately. If you add something like the following to your project file, every wxs file in the same directory as your project file will be included in your build.

<ItemGroup>
    <Compile Include="*.wxs" />
</ItemGroup>

According to this bug, Votive (WiX VS package) does not yet support wildcards, although it does work on my machine. Your mileage may vary. This, of course, is not an issue if you're not using Visual Studio to work on your setup.

Another solution would be to create the file and add it to your project file. Every time you'd build your setup, you would call heat and overwrite the file.

Afterwards, you just need to reference one of the generated elements in your setup to import the fragment. You can do this by using the -cg switch in your heat command.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top