-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.PowerShellIssue related to WinGet PowerShell Module or cmdletIssue related to WinGet PowerShell Module or cmdlet
Description
Relevant area(s)
PowerShell Module
Relevant command(s)
No response
Brief description of your issue
- The PowerShell module
Microsoft.WinGet.Client:1.12.440cannot be installed in Windows PowerShell.
Steps to reproduce
- Open
Windows PowerShellin the Windows Sandbox and execute the following command:
Install-PackageProvider -Name NuGet -Force
Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -RequiredVersion 1.12.440 -ForceExpected behavior
- No error message was displayed.
Actual behavior
- Executing
Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -RequiredVersion 1.12.440 -Forceresults in the following error:
PackageManagement\Install-Package : Package 'Microsoft.WinGet.Client' failed to be installed because: End of Central Di
rectory record could not be found.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (Microsoft.WinGet.Client:String) [Install-Package], Exception
+ FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement
.Cmdlets.InstallPackage
- The funny thing about this is that
Microsoft.WinGet.Client:1.11.460doesn't cause this problem. In other words, specifying1.11.460eliminates the error.
Install-PackageProvider -Name NuGet -Force
Install-Module -Name Microsoft.WinGet.Client -Repository PSGallery -RequiredVersion 1.11.460 -Force- Even more ridiculous is that I can solve this problem by manually installing
Install-PSResource/Microsoft.PowerShell.PSResourceGet.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
Install-PackageProvider -Name NuGet -Force
Install-Module Microsoft.PowerShell.PSResourceGet -Repository PSGallery -Force
Install-PSResource -Name Microsoft.WinGet.Client -Repository PSGallery -TrustRepositoryEnvironment
- Installation not completed; cannot be provided.Metadata
Metadata
Assignees
Labels
Issue-BugIt either shouldn't be doing this or needs an investigation.It either shouldn't be doing this or needs an investigation.PowerShellIssue related to WinGet PowerShell Module or cmdletIssue related to WinGet PowerShell Module or cmdlet