winget-cli: The type initializer for 'Microsoft.WinGet.Client.Common.BaseClientCommand' threw an exception.

Brief description of your issue

Installed the preview release that supports the PowerShell module. Commands like Get-WingetSource fail with error The type initializer for 'Microsoft.WinGet.Client.Common.BaseClientCommand' threw an exception.. Looking at the complete exception I wonder if there are leftover hard-coded references.

image

Steps to reproduce

Installed the 1.4.351 preview release and the PowerShell module. Import the module, try to run a command like Get-Wingetsource.

Expected behavior

Commands should work without error.

Actual behavior

image

Environment

Windows Package Manager v1.4.3531
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.2130
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.3531.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

PowerShell module 0.0.1 alpha

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

That’s the answer. Pesky documentation.

@ryfu-msft if it’s not too late, link the PR to this issue so it isn’t closed until the documentation is updated please 😃