Tuesday, December 30, 2014

Choosing a command line argument parser

In case you are searching for an library to help you parse command line arguments for a .NET project, there are plenty to choose from. However, most of them are missing important features so I wanted to share a list of those I think that can be used and get the job done:

Command Line Parser Library

For sure the most complete solution you will find. If this library can’t handle it, you are in big trouble. However, it seems the creator is no longer active so don’t except any further development.

Cmdline - Command Line Parser

Easier to use then the first project, but is lacking some of the features the first project offers. Uses a clever system (Reflection) to get the job done, so it might be worth a look.

Lightweight C# Command Line Parser

This is my personal favorite. One class (~30kB) you simply add to your project and you are ready to go. This is as minimalistic as it can get, so it isn’t for complicated uses cases. See this code how I use it.

No comments:

Post a Comment