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

Error "The Directory/@Name attribute's value is not a relative path" when running wix4 in Linux Ubuntu #7154

Closed
pablochacin opened this issue Jan 12, 2023 · 4 comments

Comments

@pablochacin
Copy link

Bugs

If this issue is a bug:

  • Which version of WiX are you building with?

4.0.0-rc.1+6580fe7b

  • Which version of Visual Studio are you building with (if any)?

N/A

  • Which version of the WiX Toolset Visual Studio Extension are you building with (if any)?

N/A

  • Which version of .NET are you building with?

7.0.2

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?

N/A

  • Describe the problem and the steps to reproduce it.

When testing on a Linux environment (Ubuntu 22.04) a get the error ""The Directory/@name attribute's value is not a relative path" for every "Directory" element.

To reproduce the error in Ubuntu

Install dotnet in Linux

sudo apt install -y dotnet-core-7.0 dotnet-sdk-7.0

Install wix4

dotnet tool install --global wix --version 4.0.0-rc.1 

Download this test .wsx file from the wix4 project

wget https://raw.githubusercontent.com/wixtoolset/wix4/develop/src/test/msi/TestData/Templates/Product.wxs

Try building the .wsx file

wix build -d PackageName=mypackage -d TestGroupName=mytest -d UpgradeCode=$(uuidgen) Product.wxs

/tmp/wix4/Product.wxs(32) : error WIX0389: The Directory/@Name attribute's value, '~Test WiX', is not a relative path.
/tmp/wix4/Product.wxs(33) : error WIX0389: The Directory/@Name attribute's value, 'mytest', is not a relative path.
/tmp/wix4/Product.wxs(34) : error WIX0389: The Directory/@Name attribute's value, 'mypackage', is not a relative path.
  • Describe the behavior you expected and how it differed from the actual behavior.

Wix4 is a dotnet application. I would expect it to work in Linux environment.

@robmen
Copy link
Member

robmen commented Jan 12, 2023

Wix4 is a dotnet application. I would expect it to work in Linux environment.

This expectation is incorrect. WiX depends on Windows APIs that are not abstracted by .NET on other operating systems. Therefore, it is necessary to re-implement several APIs for other platforms. We did restructure WiX v4 to (hopefully) make that easier to execute but no one stepped up to complete the work.

Until that work is completed, there is no expectation that WiX will run on Linux (or Mac).

@pablochacin
Copy link
Author

Therefore, it is necessary to re-implement several APIs for other platforms.
Until that work is completed, there is no expectation that WiX will run on Linux (or Mac).

Thanks for the quick reply. Is there any place to start looking at which APIs are those?

@robmen
Copy link
Member

robmen commented Jan 12, 2023

It isn't as clean as it should be, but you'll want to look at:

  1. WixToolset.Core.Native - https://github.com/wixtoolset/wix4/tree/develop/src/wix/WixToolset.Core.Native
  2. All P/Invoke in https://github.com/wixtoolset/wix4/tree/develop/src/wix that wasn't migrated to WixToolset.Core.Native
  3. Any references from https://github.com/wixtoolset/wix4/tree/develop/src/wix to WixToolset.Dtf.*

If this project was to be undertaken in earnest, the PInvoke in 2 and 3 (and any I've missed) should be evaluated for better abstraction.

@robmen robmen added duplicate and removed triage labels Jan 14, 2023
@robmen
Copy link
Member

robmen commented Jan 14, 2023

Duplicate of #4381

@robmen robmen marked this as a duplicate of #4381 Jan 14, 2023
@robmen robmen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants