How can I exclude files from being harvested with heat (WiX 3.5)?

后端 未结 3 2007
遥遥无期
遥遥无期 2021-01-03 20:39

I would like to harvest a folder with a lot of files by using heat.exe. But instead of harvesting all files, I would like to exclude specific file extensions like \"*.txt\"

3条回答
  •  Happy的楠姐
    2021-01-03 21:04

    Instead of trying to figure out how to harvest selected files from of a folder, I use a before build action to populate a folder with just the files that I want harvested. The following workflow has been working for me:

    1. Delete a "files" if it exists
    2. Create a "files" folder
    3. Copy the files to the "files" folder. I use the robocopy build action, that gives me enough control to specify which files to include or exclude.
    4. Harvest the entire folder.

    I have it set to run the harvest action conditionally, just for debug builds. Release builds are generated from our TFS server and use the generated .wxs from source control. It should be OK to run harvest on the build server, but it's an extra step and not having it run eliminates the "non-deterministic process" problem described by Christopher Painter. Other than that one step, the same steps execute on the build server as they do on my dev machine.

提交回复
热议问题