Skip to content

Missing DLL when using in CI #38

Closed

Description

Brief description of your issue

I'm trying to embed wingetcreate in my CI workflow by downloading the tool and using the sumbit command to auto-create a PR. When doing so, this fails due to a missing DLL.

System.DllNotFoundException: Unable to load DLL 'WinGetUtil.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
   at Microsoft.WingetCreateCore.Common.WinGetUtil.WinGetValidateManifest(String manifestPath, Boolean& succeeded, String& failureMessage)
   at Microsoft.WingetCreateCore.Common.WinGetUtil.ValidateManifest(String manifestPath)
   at Microsoft.WingetCreateCLI.Commands.BaseCommand.ValidateManifest(String manifestPath)
   at Microsoft.WingetCreateCLI.Commands.SubmitCommand.SubmitManifest()
   at Microsoft.WingetCreateCLI.Commands.SubmitCommand.Execute()
   at Microsoft.WingetCreateCLI.Program.Main(String[] args)

Steps to reproduce

# Get the latest wingetcreate exe
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
# Create the PR
wingetcreate.exe submit --token $Token $Version

Expected behavior

Should execute the submit command without error. This should work without any other dependencies.

Actual behavior

Fails due to missing DLL.

Environment

OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
BIOS Version: Parallels Software International Inc. 16.5.0 (49183), 4/2/2021

When trying to get the version number of wingetcreate it fails with the following as well:

.\wingetcreate.exe -?
                                                                                                     
A fatal error occurred. The required library hostfxr.dll could not be found.
If this is a self-contained application, that library should exist in [Y:\oh-my-posh\packages\winget\].
If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].

The .NET runtime can be found at:
  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win10-x64&apphost_version=5.0.5

Activity

  1. JanDeDobbeleer commented on May 31, 2021

    @JanDeDobbeleer
    ContributorAuthor

    In case anyone stumbles upon this in the meantime, I created the following workaround.

  2. denelon commented on Jun 1, 2021

    @denelon
    Collaborator
  3. palenshus commented on Jun 3, 2021

    @palenshus
    Contributor

    Thanks for filing Jan De Dobbeleer (@JanDeDobbeleer)! We made a conscious decision to publish a non-self-contained binary as we felt users would be running on machines with .NET installed. Adding self-contained changes the exe size from 31MB to 91MB. We could re-evaluate this though, or possibly publish a second, self-contained, exe. Demitrius Nelon (@denelon) / Kevin Larkin (MS) (@KevinLaMS), thoughts?

  4. JanDeDobbeleer commented on Jun 3, 2021

    @JanDeDobbeleer
    ContributorAuthor

    My thoughts on this is that, when I install an executable, I expect it to be able to run standalone. However, I get the context. Making both available and leaving the choice to the consumer is the best way forward, next to adding the current requirements to the documentation (I just filed a PR for the current state).

  5. denelon commented on Jun 3, 2021

    @denelon
    Collaborator

    Jan De Dobbeleer (@JanDeDobbeleer) we agree. Would you prefer that we convert this Issue into a Feature to capture that work, or close this bug and create a new feature to add a standalone .exe for the dependencies included version? We will continue to offer both based on your feedback 😊

  6. JanDeDobbeleer commented on Jun 3, 2021

    @JanDeDobbeleer
    ContributorAuthor

    Demitrius Nelon (@denelon) how you handle this in regards to ticketing is up to you (and what works best). I'm not attached to this issue outside the context of looking for a solution. I would only add a reference here in case you create a new feature/roadmap issue (people always tend to end up in the closed one 😅).

  7. added
    Issue-Feature
    and removed on Jun 3, 2021
  8. palenshus commented on Jun 11, 2021

    @palenshus
    Contributor

    I'm torn on how to do this elegantly. Right now our release has wingetcreate.exe, and two aka urls that point to it:

    https://aka.ms/wingetcreate/latest
    https://aka.ms/wingetcreate/preview

    I could add another exe, and two more aka.ms urls, like this: wingetcreate-self-contained.exe, and

    https://aka.ms/wingetcreate/latest/self-contained
    https://aka.ms/wingetcreate/preview/self-contained

    That doesn't feel particularly elegant to me, so if anyone has a better idea let me know, otherwise I'll go ahead with that. Thanks!

  9. JanDeDobbeleer commented on Jun 11, 2021

    @JanDeDobbeleer
    ContributorAuthor

    Union Palenshus (@palenshus) I don't necessarily mind that approach. You do have 4 artifacts. The alternative is working with query params which is also weird...

  10. denelon commented on Jun 11, 2021

    @denelon
    Collaborator

    Union Palenshus (@palenshus) at some point we may have breaking changes, Is the thinking to keep the URLs above and add a version number in the future? It's a pile of URLs to maintain, but it seems to be helpful. If we start to exceed the limits of GitHub for hosting the releases, we could move the artifacts to another CDN in the future.

    I agree with Jan De Dobbeleer (@JanDeDobbeleer) on avoiding the query parameters.

    https://aka.ms/wingetcreate/1/latest

  11. palenshus commented on Jun 11, 2021

    @palenshus
    Contributor

    Yep, we used "preview" to indicate the all the preview releases, but once we hit 1.0, we'd switch to /v1 or /1x or maybe just /1 for all the 1 major version releases, then /2, etc. "latest" will always point to the latest release, breaking change or not.

    Okay, sounds like we're all on board with the implementation, I'll PR it

  12. JanDeDobbeleer commented on Jun 11, 2021

    @JanDeDobbeleer
    ContributorAuthor

    Off topic, but nonetheless, we need a ship emoji reaction for this vibe.

  13. denelon commented on Jun 11, 2021

    @denelon
    Collaborator

    🛳

  14. ghost removed on Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-FeatureResolution-Fix-Committed

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions