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

Update sandbox dsc sample to use Repair-WinGetPackageManager #3984

Closed
wants to merge 1 commit into from

Conversation

mdanish-kh
Copy link
Contributor

Summary of the pull request

The existing PowerShell script does not work for the latest version of WinGet. This is because VCLibs team has deprecated the Installer URL (microsoft/winget-cli#4778) and no longer publish the latest version of VCLibs on the URL (WinGet uses VCLibs as a dependency). Updating the script to install Microsoft.WinGet.Client PowerShell module & use Repair-WinGetPackageManager cmdlet to bootstrap WinGet.

References and relevant issues

Detailed description of the pull request / Additional comments

This will unblock winget configure https://aka.ms/sandbox.dsc.yaml

Validation steps performed

Manually validated the sandbox.dsc.yaml script with winget configure. The configuration successfully installs the latest version of WinGet

PR checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated

@mdanish-kh
Copy link
Contributor Author

@denelon - I wasn't able to successfully run the full.sandbox.dsc.yaml configuration. It gets stuck on Apply :: WindowsOptionalFeature [WindowsSandbox], but that's not related to the changes here. The configuration doesn't run for me without these changes as well

Manually validated the sandbox.dsc.yaml configuration tho, and it successfully installs the latest WinGet

@mdanish-kh mdanish-kh force-pushed the update-sandbox-script branch from c899e31 to 96117d1 Compare November 16, 2024 20:03
@denelon
Copy link
Contributor

denelon commented Nov 17, 2024

The issue with the "full" version is related to how DISM is called as a nested dependency. It's an OS related issue being fixed in newer versions of Windows. The only workaround I've found is to use "unpackaged" PowerShell 7 (an MSI based install) and then call it via Get-WinGetConfiguration -File <path> | Invoke-WinGetConfiguration.

@mdanish-kh
Copy link
Contributor Author

The issue with the "full" version is related to how DISM is called as a nested dependency. It's an OS related issue being fixed in newer versions of Windows. The only workaround I've found is to use "unpackaged" PowerShell 7 (an MSI based install) and then call it via Get-WinGetConfiguration -File <path> | Invoke-WinGetConfiguration.

I see, I'm able to successfully run & validate the full version with the suggested approach

mdanish-kh added a commit to mdanish-kh/winget-dsc that referenced this pull request Nov 27, 2024
denelon pushed a commit to microsoft/winget-dsc that referenced this pull request Nov 27, 2024
…older (#133)

* Copy entire folder from devhome repository

* Update README URL

* markdown + general lint fixes

* Update sandbox script as per microsoft/devhome#3984

* spelling

* try again

* markdownlint
@mdanish-kh
Copy link
Contributor Author

This sample was updated in microsoft/winget-dsc#133

@mdanish-kh mdanish-kh closed this Nov 27, 2024
@mdanish-kh mdanish-kh deleted the update-sandbox-script branch November 28, 2024 14:21
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

Successfully merging this pull request may close these issues.

3 participants