Skip to content

System.CommandLine incorrect docs about DefaultValueFactory #50576

@piskov

Description

@piskov

Describe the issue or suggestion

https://learn.microsoft.com/en-us/dotnet/standard/commandline/get-started-tutorial#add-subcommands-and-custom-validation

Image

If I understand correctly the highlited code is never executed because default value factory is called only when no value provided via CLI call.

The highlighted bit should probably be in the CustomParser as of 2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions