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

The directory name: x64 is the same as one of the MSI Public Properties and can cause unforeseen side effects #19

Closed
maikebing opened this issue Jan 5, 2017 · 6 comments

Comments

@maikebing
Copy link
Contributor

maikebing commented Jan 5, 2017

error LGHT0204: ICE99: The directory name: x64 is the same as one of the MSI Public Properties and can cause unforeseen side effects. [D:\Multi-Runner\builds\3c61e4ea\0\maikebing\DES\src\DES.Installer\DES.Installer.wixproj]

Wrong code:
<Directory Id="x64" Name="x64" />

Resolvent:
http://stackoverflow.com/questions/16851193/with-wix-distribute-a-program-that-uses-sqlite-must-work-on-both-32bit-and-64b

My code
<Directory Id="DIR_x64" Name="x64" />

Can you fix this problem in the new version?

@tom-englert
Copy link
Owner

This is not an issue of Wax - it just helps you to maintain the file list in .wxs files - it does not compile your code.

Your issue is using illegal ids, and the stackoverflow article already has the answer.

@maikebing
Copy link
Contributor Author

This is the wax generated by ID, because SQLite relies on X86 and x64 files. Using the wax will automatically generate the ID.
Can WAX avoid generating such ID?

@Leogiciel
Copy link
Contributor

Leogiciel commented Jan 6, 2017

@maikebing : You can force wax to prefix directory ids by "dir_". I'll come back to you with a working example.

@tom-englert : Maybe implementing this can be interesting, it will avoid some other conflicts like this one ?

@Leogiciel
Copy link
Contributor

@maikebing : To achieve this, you can replace line 154 of file WaxProject.cs :
return (_configuration.DirectoryMappings.TryGetValue(directory, out value) && (value != null)) ? value : GetDefaultId(directory);

by :
return (_configuration.DirectoryMappings.TryGetValue(directory, out value) && (value != null)) ? value : string.Concat("dir_",GetDefaultId(directory));

@maikebing
Copy link
Contributor Author

OK!

@tom-englert
Copy link
Owner

The solution suggested by @Leogiciel would break backward compatibility, so I have added a more specific workaround.
However you can always create your own id's an just add a custom mapping in Wax.

@maikebing: I am also using SQLite in some projects, but SQLite has a post-build step to copy those files, and I had to maintain those entries manually, so I wonder how Wax can know about these directories?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants