2

I'm currently looking for packages to help me develop a C# console app for automatisation in .NET 6.0, the packages should ideally support me in the following tasks:

  • command line argument parsing
  • autocompletion for parameters on the commandline (with TAB)
  • "pipelining" or "chaining" the output from one command as input to the next, like it is done f.e. in powershell:
Command-1 | Command-2 | Command-3

Are there any packages that should be used for this specifically in .NET 6.0 (and the new command line template) ?


For "command line argument parsing" I implemented CommandLineParser (last updated 5/1/2020) in the current prototype, which works fine, however this article recommends the new System.CommandLine and also mentions other packages, should I favour that in .NET 6.0 ? Regarding pipeling I found this old SO post, is pipelining even something that is done in C# console apps, or should I consider implementing PowerShell Cmdlets for that?

dan-kli
  • 568
  • 2
  • 13
  • 1
    AutoCompletion of parameters on the command line is not a feature of your application. It is an feature of powershell and it is enabled through Attributes within your script ([some more explanation](https://powershell.one/powershell-internals/attributes/auto-completion)). If and how this can be used within a .Net application I don't know. – Oliver Jan 26 '22 at 10:23
  • Thank you for the link, I will check it out. I was just looking at [this github repo](https://github.com/rohankapoor/AutoPrompt) for autocompletion for C# .NET console apps, but it hasn't been updated for ~2 years. – dan-kli Jan 26 '22 at 10:27

0 Answers0