tom-englert/Wax

Directory mappings only contain native lib directories

Closed this issue · 4 comments

I am trying to write a Wix installer for a single project WPF app. The problem appears to be the inclusion of LibGit2Sharp, which pulls in LibGit2Sharp.NativeBinaries. Wax seems to be confused by the presence of the .\lib directories under .\bin\debug.

This can easily be reproduced. Create an empty .Net Framework WPF application. Build it. Add a Wix v3 setup project. Open up the Wix Setup Editor. All looks normal. Add the LibGit2Sharp NuGet package to the WPF project's references. Build it. Go back to the Wix Setup Editor and refresh. The (4) Directory mappings Directory column becomes red and is filled only with the .\lib directories. The (5) File mappings table is all red, contains all the files in the .\lib directories which are labeled Unmapped, does not scroll, and nothing can be selected.

You must first fix (4) by adding the directory before you can add files (5)

I am new to Wix, and could not figure out how to add the (4) Directory mappings. I have tried adding new elements to the element. Unfortunately, there do not seem to be any examples on the web [6 results] that have more than the single element without a key.

  <DirectoryMappings>
    <Item Key="" Value="INSTALLFOLDER" />
  </DirectoryMappings>

My attempts using hardcoded values, or using Wix variables such as $(var.MyWpfProject.ProjectDir) do not add the directory as you are suggesting.

  <DirectoryMappings>
    <Item Key="" Value="INSTALLFOLDER" />
    <Item Key="debug" Value="d:\Projects\MyWpfProject\MyWpfProject\bin\debug" />
  </DirectoryMappings>

Could you please provide a more explicit example of how to add another directory, or perhaps a link on How to add the directory? Thank you.

Just click the + symbol

And don't touch the .wax file