Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HeatDirectory document #6020

Closed
atwayne opened this issue May 28, 2019 · 6 comments
Closed

HeatDirectory document #6020

atwayne opened this issue May 28, 2019 · 6 comments
Labels

Comments

@atwayne
Copy link

atwayne commented May 28, 2019

The document of HeatDirectory task implies that it accepts more than one directory

Parameter Description
Directory Required item group parameter.The list of directories to harvest.

The description is wrong as HeatDirectory doesn't take more than one directory

https://wixtoolset.org/documentation/manual/v3/msbuild/task_reference/heatdirectory.html

@BMurri
Copy link

BMurri commented May 28, 2019

Actually, because of the way msbuild works, the task does accept multiple directories. Due to msbuild task batching, msbuild will pass one Directory at a time to the HeatDirectory task and thus the task will pass one directory at a time to the harvesting tool.

You can load up as many non-identical values in the Directory item you wish and call the target just one time and it all works perfectly.

@atwayne
Copy link
Author

atwayne commented May 29, 2019

Thanks... I did some test and it doesn't look like it's working as expected:

<ItemGroup>
      <DirectoryItem Include="$(SolutionDir)First\"/>
      <DirectoryItem Include="$(SolutionDir)Second\"/>
</ItemGroup>

<HeatDirectory OutputFile="Dependencies.wxs"
                   Directory="@(DirectoryItem)"

Then I have the following error message in output

16>C:\Program Files (x86)\WiX Toolset v3.11\bin\Heat.exe dir "\PATH\TO\First\;\PATH\TO\Second" 
16>heat.exe(0,0): error HEAT0001: The given path's format is not supported.

Maybe I did it wrong but it looks like the HeatDirectory task combines all the paths and pass it as a single parameter to the heat tool, and then a failure...

@BMurri
Copy link

BMurri commented May 29, 2019

Each directory usually needs a unique DirectoryRefId, and you didn't supply any.

  <ItemGroup>
    <DirectoryItem Include="$(SolutionDir)First\">
        <DirectoryRefId>First</DirectoryRefId>
    <DirectoryItem>
    <DirectoryItem Include="$(SolutionDir)Second\">
        <DirectoryRefId>Second</DirectoryRefId>
    <DirectoryItem>
  </ItemGroup>

@BMurri
Copy link

BMurri commented May 29, 2019

We should be discussing this on wix-users rather than here. If on wix-users it's determined that a bug exists, you would then be directed to open the issue with all the pertinent information as spelled out in the template you erased.

@BMurri
Copy link

BMurri commented May 29, 2019

The documentation mentions ComponentGroupName in the context of multiple directories. This use case is directly covered in the documentation. Please close this issue.

@robmen robmen added the support label May 29, 2019
@robmen
Copy link
Member

robmen commented May 29, 2019

For support please contact the wix-users mailing list.

It is possible through discussion a specific bug in the WiX Toolset will be uncovered but usually someone can help you find the error in your .wxs code.

@robmen robmen closed this as completed May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants