-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
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.
Related: #51623
TODO:
-
toolandworkloadcommands (should be straightforward to convert to the new pattern): Separate command parsing from action binding in Tool and Workload subcommands #52139 -
newcommand - complex dependency on template engine: Template Engine CLI commands: separate definitions from implementations #51747 -
nugetcommands: Addnuget whyandnuget packagecommand definitions #52661 -
testcommand - Separate 'test' command definitions from implementations #51781 - Move all command definitions to a separate library.
Reactions are currently unavailable