Brian Drennan's Blog

Exploring curiosities in software.

Tag "Command Line"

1 post

CommandLineParser - .NET Arg Parsing Made Easy!

I’m a huge fan of command-line utilities (aka, console apps). In general, I find console apps to have much lower barriers to use than traditional window-based systems: in many respects, they’re much easier to build than other alternatives (such as Windows Forms and Windows Presentation Foundation apps), with generally lower barriers to entry. That said, I hate writing argument parsers. It’s not that it’s super-difficult, but it’s tedious, and for such a common task, I’d really like to use a library. I’m aware of a few, and found what is easily my favorite recently, CommandLineParser. In this post, I’ll explore what my preferences are, and why I’ve recently selected this one as the default when starting new .NET projects. I’ll also explore how I go about selecting new dependencies for projects that I’m working on.

.net dotnet C# command line args