Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News .NET 4 Will Not Have a Command Line Parser

.NET 4 Will Not Have a Command Line Parser


Command line parsing was the first task performed by most applications back in the 80’s and even today it is very important. Yet after all these years there isn’t a standard parser available .NET, leaving developers to reinvent this common pattern over and over again.

In the current CTP, it appeared as thought .NET 4 would include a command line parser. We were going to report on this and the comparison to Mono’s API for the same task, but it turns out it was mistakenly released.

We are not shipping System.Shell.CommandLine in .NET 4. This was based on an intern project from a couple of years back that was mistakenly public in the .NET Framework 4.0 CTP. It wasn't a design that we were happy with and has been removed and will not be present in the next preview release.

We have a *much better* command line parsing API, along the lines of Mono.Options, that we're planning to release on CodePlex later this year.


We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Isn't that true of any engineering task?

    by peter lin,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I just might be jaded, but any time a engineering task is given to someone that doesn't care for it, or doesn't have a good understanding, it ends up being a pile of over engineered junk. There's plenty of examples out there in closed source and open source projects. If the default MS provided tool doesn't fit the task, then use something else!

  • NConsoler - command line parser

    by Maxm Tihobrazov,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    You can use it as simple as:

    public static void Main(string[] args) {
    Consolery.Run(typeof(Program), args);

    public static void DoWork(
    [Required] string name,
    [Optional(-1)] int count) {
    // ...

    C:\>program.exe Administrator /count:10

  • Backward compatibility

    by .Net developer,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Well, what about backward compatibility? should not the .net framework be compatible with its previous versions?
    I hope there is an other way to do the same tasks provided by the framework for the sake of compatibility, please.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.