When the dotnet host is run without any arguments, it should display proper help
Steps to reproduce
dotnet
Expected behavior
See something along the lines of the following:
.NET Command Line Tools (1.0.0-preview1-002702)
Usage: dotnet [common-options] [command] [arguments]
Run your application: dotnet [path to your assembly.dll]
Arguments:
[command] The command to execute
[arguments] Arguments to pass to the command
Common Options (passed before the command):
-v|--verbose Enable verbose output
--version Display .NET CLI Version Number
--info Display .NET CLI Info
Common Commands:
new Initialize a basic .NET project
restore Restore dependencies specified in the .NET project
build Builds a .NET project
publish Publishes a .NET project for deployment (including the runtime)
run Compiles and immediately executes a .NET project
test Runs unit tests using the test runner specified in the project
pack Creates a NuGet package
Actual behavior
See the following:
Usage: dotnet [--help | app.dll]
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64
/cc @piotrpMSFT @schellap @eerhardt @shanselman @richlander
Have you tried RTM bits?
See PR dotnet/cli#3018
Microsoft .NET Core Shared Framework Host
Version : 1.0.1
Build : cee57bf6c981237d80aa1631cfe83cb9ba329f12
Usage: dotnet [common-options] [[options] path-to-application]
Common Options:
--help Display .NET Core Shared Framework Host help.
--version Display .NET Core Shared Framework Host version.
Options:
--fx-version <version> Version of the installed Shared Framework to use to run the application.
--additionalprobingpath <path> Path containing probing policy and assemblies to probe for.
Path to Application:
The path to a .NET Core managed application, dll or exe file to execute.
If you are debugging the Shared Framework Host, set 'COREHOST_TRACE' to '1' in your environment.
To get started on developing applications for .NET Core, install .NET SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
You mean latest? no, I haven't tried them. This above is the help now?
@schellap jeez, and I even :shipit: the PR. 😞
I edited the comment above with the latest messaging... the link is the forward link. Probably, it should be dot dot net.
Here's what I would like to see:
Microsoft .NET Core Host Usage: dotnet [options] [path-to-application]
Options:
--help Display .NET Core Host help.
--version Display .NET Core Host version.
--fx-version
Path to Application: The path to a .NET Core managed application, dll or exe file to execute.
Set 'COREHOST_TRACE' to '1' to see tracing information.
Learn more about .NET Core: https://dot.net/core
@richlander a question: would you remove the version of the host?
Hmmm ... I can see that I had a flaw in my thinking. I was think the same info would be available via dotnet --version but didn't actually check that assumption. Bad plan. I can also guess that there are tools that will check the version via that command and it would be bad to add more text there.
Alternate proposal:
Microsoft .NET Core Host - Version 1.0.1
Usage: dotnet [options] [path-to-application]
Options:
--help Display .NET Core Host help.
--version Display .NET Core Host version.
--fx-version .NET Core version to use to run the application.
--additionalprobingpath Path to use for probing policy and assembly probing.
Path to Application:
The path to a .NET Core managed application, dll or exe file to execute.
Set 'COREHOST_TRACE' to '1' to see tracing information.
Learn more about .NET Core: https://dot.net/core
Build: cee57bf6c981237d80aa1631cfe83cb9ba329f12
It's not info that helps you with help, so it seems odd for two lines of version information to come at the top of the display. So, I propose to put the version info in the first line and add the Build commit in the last line. That seems like the value of the info is exactly commensurate with its placement.
On that note, what is the build SHA from? Which repo?
This is actually very confusing: dotnet --version when CLI is present and absent are different things.
The SHA is from the repo dotnet is built and released from. This can change, but given the version we should be able to locate the repo.
There are 4 components here: SDK, Shared FX, Dotnet Implementation (DLL), Dotnet Bootstrapper (EXE). Which version should it print? or should it print any version at all in the absence of the SDK?
Should it even say Host which is an implementation detail?
Btw, I like your less clutter.
@schellap @richlander I would remove the SHA version. Though useful, there are other places where we should put SHAs for all the stuff we build. The version number question is tied to the following (at least in my mind): is there a case where I would be getting the host on its own (servicing update or some such)? If yes, then I can see the version of the host being helpful.
I think we should drop the SHA line.
In a later release we should add a new command that prints all of those versions. For now, I think that the displaying the version of just "dotnet" isn't meaningful, particularly when it comes from one of the less popular repos.
Ah, that's what @blackdwarf is saying, too.
@richlander we can take this fix for 1.1.0 to not reset escrow for core-setup. The original help message is verbose but isn't too bad.
Cc @joshfree @gkhanna79.
Works for me.
SHA should be in --info I think
The one usage for SHA (and MD5 hashes) I know is download verification. Seems like something you would want to do prior to running the binary. Are there other uses that I'm missing?
The part that says
To get started on developing applications for .NET Core, install .NET SDK from
is very misleading when you already installed sdk
its like you installed .NET Core if you want the .NET Core SDK now go here
We have landed on a layout for the host help that we are satisfied with for now. Closing this issue.