PowerShell module does not work in PowerShell 5.1
@RDMacLachlan is already working on this.
Since Sep 29, 2022.
Assessment
This issue has not been assessed yet.
Description
Brief description of your issue
The Microsoft.WinGet.Source.psd1 module will not load with PowerShell 5.1. It fails with the following error:
Add-Type : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more
information.
At C:\src\winget-cli-restsource\Tools\PowershellModule\src\Microsoft.WinGet.Source.psm1:24 char:17
+ ... Add-Type -Path "$PSScriptRoot\Library\HelperLib\x64\Micro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Add-Type], ReflectionTypeLoadException
+ FullyQualifiedErrorId : System.Reflection.ReflectionTypeLoadException,Microsoft.PowerShell.Commands.AddTypeComma
nd
LoaderExceptions contains the following missing dependencies:
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or
one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or
one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or
one of its dependencies. The system cannot find the file specified.
The README.md does not make any mention that PowerShell 5.1 is not supported and that you need a newer version of PowerShell. (It loaded for me fine in PowerShell 7, after working around #172. :))
This is not called out in the documentation as a prerequisite.
- Dominant language
- C#
- Stars
- 317
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
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.
More from microsoft/winget-cli-restsource
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Issue-Feature
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Font Support OpenIssue-Feature
microsoft/winget-cli-restsource#310 · 1 comment · 1 assignee ·
-
Issue-Bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/winget-cli-restsource#309 · 2 comments ·
All issues in microsoft/winget-cli-restsource
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·