Skip to content

[dotnet cli] Separate command definitions from implementations #51748

@tmat

Description

@tmat

The current implementation of dotnet CLI mixes definition of CLI Commands with their implementation (SetAction).

Consequently, code that parses CLI transitively depends on the whole SDK (NuGet, Template Engine, VS Test, etc.).

E.g. dotnet-watch is pulling in a lot of dependencies that it shouldn't. The main reason is that we need to know all existing dotnet commands in order to parse dotnet-watch command line correctly and forward options as needed.

This is also problematic for AOT. We want to be able to do all the parsing inside the AOT 'bubble' and decide on a per-command basis where to call.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions