microsoft / microsoft/winget-cli
Enable WSL fails during configuration
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
@meikTranel reported in https://github.com/microsoft/winget-cli/discussions/3346
# Enable WSL
- resource: PSDscResources/WindowsOptionalFeature
directives:
description: Enable WSL
settings:
Name: Microsoft-Windows-Subsystem-Linux
WSL Enabling fails because apparently winget configure runs pwsh.exe which cannot run PS Code regarding windows optional feature management.
Steps to reproduce
Build a configuration with the above resource.
Expected behavior
Windows Subsystem for Linux will be anabled
Actual behavior
An error reporting "Class not registered".
Environment
Not reported.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the configuration using the PSDscResources/WindowsOptionalFeature resource for Microsoft-Windows-Subsystem-Linux, then inspect how winget configure invokes pwsh.exe for this resource. Compare the failing Class not registered error with the expected WSL enablement; done means the configuration completes successfully and enables WSL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100