-
Notifications
You must be signed in to change notification settings - Fork 412
Closed
Labels
Milestone
Description
After updating to the latest release (System.CommandLine v2.0.0-beta3.22114.1), I am now getting the following error at runtime:
Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: --version
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at System.CommandLine.Parsing.StringExtensions.ValidTokens(Command command)
at System.CommandLine.Parsing.StringExtensions.Tokenize(IReadOnlyList`1 args, CommandLineConfiguration configuration)
at System.CommandLine.Parsing.Parser.Parse(IReadOnlyList`1 arguments, String rawInput)
at System.CommandLine.CommandExtensions.GetDefaultInvocationPipeline(Command command, String[] args)
at System.CommandLine.CommandExtensions.InvokeAsync(Command command, String[] args, IConsole console)
No other changes were made to the app that was previously working. I do use System.CommandLine.NamingConventionBinder to be compatible with the older CommandHandler.Create model, could this be the problem?
david-jarman, RobinS-S, perlun and erjok