Are you a developer that sometimes builds command line tools? You should consider creating a #powershell module instead. You get command and parameter auto complete without building anything.
https://svrooij.io/2024/01/18/dependencies-powershell-module-csharp/
#mvpbuzz #development #dotnet
Using dependency injection in your C# PowerShell Modules

Using dependency injection in your C# PowerShell module and run your async code like you're used to.

@svrooij This!!! 💯 ⬆️
@sassdawe feedback like this is what everybody could use!
Spread the positivity
@svrooij I had a project once where we needed to create a tool, the #dotnet developer almost started to write it as a standard CLI tool when I showed him a sample project of a #PowerShell #cmdlet  with all the built in pluming for input and output handling. I think it was love at first sight for them 
@sassdawe @svrooij if only I had been able to persuade the winget team that #powershell was the right answer. Sadly I did not succeed.
@DoctorDNS @sassdawe maybe there is an implementation in the making….. 🤐 https://github.com/svrooij/WingetIntune/tree/feature/ps-module
Winget is all open-source… It depends on what you want to do, but if I can generate the same installer commands, you should be able to create a C# or even pure PowerShell module that does the same as winget.
GitHub - svrooij/WingetIntune at feature/ps-module

Package any app from Winget to Intune - WinTuner. Contribute to svrooij/WingetIntune development by creating an account on GitHub.

GitHub
@svrooij @sassdawe widget is, iirc, all C++ so it would be a total rewrite.
@DoctorDNS @svrooij @sassdawe not a _total_ rewrite, I mean, C++/CLI is a thing.
@jaykul @svrooij @sassdawe but how much C++ code could be converted into c#? But it won't happen.

@DoctorDNS @svrooij @sassdawe but why would *they* want to write a tool in .NET?

This is the team that -- HERE, in the 212st Century -- ignored WPF and Silverlight and rewrote XAML from scratch in C/C++ to make WinUI, a Windows-only app framework that "decouples" WinRT Xaml from the operating system -- without actually making it work in any other operating system.

@jaykul @svrooij @sassdawe needless to say, the current team management will not fix the problem. Still, 3 years in and the product is still in beta and still unsupported. I just think about what could have been.
@DoctorDNS @svrooij @sassdawe I'm still using Chocolatey.
@jaykul @svrooij @sassdawe me too. I can't help thinking msft could have bought chocolatey for less than they spent on widget.
@DoctorDNS @svrooij @sassdawe LOL, I hope you're over-estimating how much effort has been paid for on WinGet.
@jaykul @DoctorDNS @sassdawe i'm not going to convince you guys... Just saying that installing apps when everybody sends you the details of the installer is not that complex.
Building something like this in c++ might be the biggest issue
@svrooij @jaykul @sassdawe winget was a badly scoped project. IMHO. It could have been something great.
@DoctorDNS @svrooij @jaykul IMO #winget is good enough for the everyday nerd, but.. there is no but. For more advanced cases, and enterprise use.. it can't really be an alternative to #chocolatey
@sassdawe @DoctorDNS @svrooij have you ever dared to run "winget upgrade * -all" ?
@jaykul @sassdawe @svrooij haven't installed winget.

@DoctorDNS @jaykul @svrooij I did and learned that if I do that without using my Admin account I won't be happy.

It was able to remove stuff but never installed the newer version, so I had to figure out what was missing and install them again.

Fun stuff.

@sassdawe @jaykul @svrooij I found it odd it could update things it hasn't explicitly installed. Dangerous, I feels but it is by design.
@DoctorDNS @sassdawe @svrooij that's ... one of the reasons I don't use it...