Is there any way to call winget programatically from C#? #4469
-
Hey there folks, love your work on winget. I know that there is the PowerShell module available which I have played with, but I was wondering if there was any way to call into winget via C# directly programatically (without going via a PowerShell interpreter)? Looking at the PowerShell module, it seems that maybe the Is there any way to do this presently or am I missing anything? Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I've been doing a lot more work on this and have it all working. The best reference is the implementation here. The DevHome codebase has examples of using the factory to create various objects and work with the WinGet package manager via C#. Cheers |
Beta Was this translation helpful? Give feedback.
-
I managed to isolate a minimal working example here: https://github.com/marticliment/WinGet-API-from-CSharp Perhaps this may be useful to you |
Beta Was this translation helpful? Give feedback.
I managed to isolate a minimal working example here: https://github.com/marticliment/WinGet-API-from-CSharp
Perhaps this may be useful to you