BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

.NET 4 Will Not Have a Command Line Parser

| by Jonathan Allen on Mar 08, 2009. Estimated reading time: less than one minute |

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.

.

Rate this Article

Adoption Stage
Style

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.

Tell us what you think

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

Email me replies to any of my messages in this thread

Isn't that true of any engineering task? by peter lin

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

You can use it as simple as:

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

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

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

Backward compatibility by .Net developer

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

Email me replies to any of my messages in this thread

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

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT