Learn How the System.CommandLine Library Can Improve the Tools You Build
Most .NET developers start their career off by writing the time-honored program “Hello World.” This simple console application paints a picture of simplicity when building out console applications. However, building out a robust command-line application that delights your users takes significantly more work. Features such as intelligent parsing of the command line arguments, nested commands, context-sensitive help, tab completions, cancelation, and more, all take significant time and effort to implement.
In this user group, Kevin Bost and Jon Sequeira take a deep dive into the System.CommandLine library. This is the same library that is used by the Dotnet CLI starting with .NET 6 and is expected to have its initial release before the launch of .NET 6. This library brings together all the features and experiences needed to build an awesome command-line application and lets you focus on the details of your app, rather than building out boilerplate code. It includes functionality for parsing command line arguments, intelligent invocation of commands and subcommands, context-sensitive help, tab completions, cancelation, and more. Beyond the core library, come learn about one of the app models that allow for strongly typed Main methods.
As part of the presentation, we leverage .NET Interactive Notebooks to quickly explore the APIs and examples. The notebook can be found on GitHub and can be used to follow along and do your own experimenting with the library.
Check out Mark Michaelis’ article Essential .NET: Parse the Command Line with System.CommandLine, originally posted in MSDN Magazine.
Don’t miss another meet-up! Join us at the next Spokane .NET Users Group event.
Does Your Organization Need a Custom Solution?
Let’s chat about how we can help you achieve excellence on your next project!