Open nohwnd opened 2 years ago
This is a core tension between MSBuild and the .NET CLI, because many/most of its flags are not actually consistent with the CLI design principles that we try to adhere to in the .NET SDK, as documented here and here. Since the SDK merely wraps many of the third-party commands, those commands don't know that they're being hosted in a context that doesn't surface the same conventions as they do. This is a continuing point of integration pain.
For dotnet msbuild
(meaning the command where we directly shim to the MSBuild command line), all of the SDK-style help invocations do delegate to MSBuild which I think is desired behavior. For the commands that the SDK wraps/customizes, though, the behavior is less clear. These commands wrap/transform on purpose, so I think the best approach might be to:
but I don't think that we should support /help
or -help
forms in the SDK, since they are non-standard. The single-flag form prevents the use of POSIX bundling of short-form arguments, and the /
option prefix is a windows-specific idiom that we do not want to promote.
"/?" is also non-standard and it work, but I hear you 👍 Could the output append: "This is MSBuild help, if you wanted dotnet <command>
help, please use dotnet <command> --help, -h
"? With the <command>
substituted?
yeah, I agree that /?
is non-standard, I want the System.CommandLine library to allow customizing the help option aliases specifically so we can remove it!
I think the follow-on text is an interesting idea - certainly doable!
Edited it, formatter ate my <command>
place holders.
Describe the bug
Calling
dotnet <command> -help
ordotnet <command> /help
shows MSBuild help, and not<command>
help. This is happening onbuild
andtest
(and probably others). Onrun
it gives no response, but also no error.It would be nice if
/Help
and-help
were handled in a consistent way, most likely by redirecting to the command help./?
and-h
both work as--help
, and show the command help. MSBuild help suggests to use-?
or-h
, which will not show msbuild help, but instead will show the command help.To Reproduce
Run
dotnet build /help
Exceptions (if any)
There are none.
Further technical details
I am on 7.0.100-preview.4.22211.1