Description
Currently, the dotnet
commands for printing data (--info
, --help
, --list-runtimes
, --list-sdks
) are required to be the first argument. With https://github.com/dotnet/runtime/pull/1160780, an --arch
option is now available for --list-runtimes/sdks
- and must come after the data printing command. The host has a number of other options intended for running an application:
runtime/src/native/corehost/fxr/command_line.cpp
Lines 25 to 31 in 39e8c08
If any are specified before a data printing command, the data printing command is not recognized and the operation fails.
This is inconsistent with how such commands are typically handled, where they can appear in any order and specified with other options - where those options may not actually apply and printing data overrides other options.
We should consider relaxing this ordering requirement to be consistent with other command line behaviour.
Some considerations:
--list-runtimes/sdks
is used as an indication that it is only for host data and the SDK does not need to be resolved or run. It should remain that way.--info
and--help
call into the SDK when it exists - which will error out on unknown options. We'll need to skip the other known host options when calling into the SDK- Any unknown option coming before a printing command should still go to the SDK - for example
dotnet <unknown_option> --list-runtimes
should still call into the SDK
Metadata
Metadata
Assignees
Type
Projects
Status