You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
name collision behavior is inconsistent for commands, directives, and options added to the same parent #2223
Currently, certain naming collisions between symbols under a common parent command will result in a parser configuration whose behavior might not be correct during parsing (e.g. one symbol will always shadow the other) or might throw an exception during parsing.
Commands and directives having the same name will throw System.ArgumentException: An item with the same key has already been added. even though this will not result in a misbehaving parser, since at parse time the actual directive tokens are differentiated from commands by the presence of surround [ and ] brackets. (Related: UseHost() - can't have subcommand "config" #2220)
A command with brackets in its name ("[command]") could be shadowed by a directive named command.
Commands and options with matching names or aliases will not currently result in an exception during parsing.
Activity
skip two tests added to track dotnet#2223
Move directives to `CliRootCommand` (#2224)
jeffhandley commentedon Sep 18, 2025
We don't think this is an issue anymore.