July 2022 Update #2300
Replies: 6 comments 10 replies
-
Very exciting! Looking forward to deprecating my Crescendo module, because trying to parse the native client's output is extremely painful. |
Beta Was this translation helpful? Give feedback.
-
Some comments
|
Beta Was this translation helpful? Give feedback.
-
Why does not use OneGet to get integration with package managing system in PowerShell? I think |
Beta Was this translation helpful? Give feedback.
-
@denelon July and August have come and gone, are there any updates on PowerShell support worth sharing? |
Beta Was this translation helpful? Give feedback.
-
@jantari thanks for the ping. I don't think enough has changed yet to demonstrate real progress, but I will pull an update together. |
Beta Was this translation helpful? Give feedback.
-
@denelon, I'm a bit curious about the approach you are using. I've not had much time to look through the code so it's entirely possible I'm missing the obvious as to why my thoughts on the matter might be wrong. Wouldn't a quick win for PS support (and any other scripting language) be to add JSON as an output option? winget list -o json | ConvertFrom-Json | Format-Table The next step would then be to wrap it and cast it class WinGetPacakage {
[string]$Name
[string]$Id
}
function Get-WinGetPackage {
[WinGetPackage](winget list -o json | ConvertFrom-Json)
} Also if you need to call COM, wouldn't creating the PowerShell module in C# and using the interop classes be easier than trying to access COM from PowerShell? Wouldn't that also solve the Powershell 5.1 / 7 issues by targeting different .NET frameworks during the build? |
Beta Was this translation helpful? Give feedback.
-
We've been digging deeper into calling the COM API via PowerShell.
We have several cmdlets working in PowerShell 6 and 7 against the COM API rather than the winget client so we can provide rich objects. I've shared a couple of screenshots below. There were some challenges referencing the "winmd" file that we had to resolve. We're still tackling challenges and looking at how to support Microsoft.WinGet.Client in PowerShell 5.1.
I'm expecting to get a subset of this released starting with Windows Package Manager 1.4-preview releases.
I've got a list of candidates below for getting native PowerShell support completed:
Beta Was this translation helpful? Give feedback.
All reactions