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


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions