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

Light fails to handle containers with relative path in name #5677

Closed
Wixophe opened this issue Sep 5, 2017 · 2 comments · Fixed by wixtoolset/wix#139
Closed

Light fails to handle containers with relative path in name #5677

Wixophe opened this issue Sep 5, 2017 · 2 comments · Fixed by wixtoolset/wix#139
Assignees
Milestone

Comments

@Wixophe
Copy link

Wixophe commented Sep 5, 2017

  • Which version of WiX are you building with?

Windows Installer XML Toolset Linker version 3.11.0.1701

  • Describe the problem and the steps to reproduce it.
    I declare several containers in my bundle. All is fine when the containers name have no path, e.g. Name="D1".
    However, if I use a relative path in the name, e.g. Name="Data\D1", light crashes with the following message:
light.exe : error LGHT0001 : The system cannot find the path specified. (Exception from HRESULT: 0x80070003)
Exception Type: System.IO.DirectoryNotFoundException
Stack Trace:
   at Microsoft.Tools.WindowsInstallerXml.Cab.Interop.NativeMethods.CreateCabFinish(IntPtr contextHandle, IntPtr newCabNamesCallBackAddress)
   at Microsoft.Tools.WindowsInstallerXml.Cab.WixCreateCab.Complete(IntPtr newCabNamesCallBackAddress)
   at Microsoft.Tools.WindowsInstallerXml.Binder.CreateContainer(ContainerInfo container, String manifestFile)
   at Microsoft.Tools.WindowsInstallerXml.Binder.BindBundle(Output bundle, String bundleFile)
   at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
   at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args) 

Using -v, and setting WIX_TEMP, it looks like light cannot create the sub folder (in this case, "Data", under its temp folder. Or rather, it does not try, but expect the folder to be present; I cannot create that folder myself, as it is under a temporary sub folder created by light each time.

I would expect light to create the temp folder, then copy them to the final folder, so that I can "hide" the containers in sub folders in my final media

@barnson
Copy link
Member

barnson commented Sep 5, 2017

What does the authoring for your containers look like?

@Wixophe
Copy link
Author

Wixophe commented Sep 6, 2017

Hi Bob,
I have 5 containers, and they all look like this (with different id, name, and content)

 <Container Id=”z1” Name=”z1”>
  <PackageGroupRef Id=”PKGGROUP_Something”/>
  <PackageGroupRef Id=”PKGGROUP_SomethingElse”/>
</Container>

The above works fine, but all my containers end up in the same folder as the bundle – confusing for the end user.
When I run light in verbose mode, I can see it places all the containers in the same temp folder as the bundle, then copies everything to the final folder.

To try putting the containers in a subfolder, I simply set the name attribute as so
Name="Data\z1"
using the same "Data" folder for all my containers. And that I believe crashed light, which, does not appear to create the Data folder in its temp area, but still try to write the containers there. Apparently, it should first create the folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants