question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When the dotnet host is run without any arguments, it should display proper help

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
schellapcommented, Jun 18, 2016

Btw, I like your less clutter.

1reaction
richlandercommented, Jun 18, 2016

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >
Select which .NET version to use
NET CLI must choose an SDK version for every dotnet command. It uses the latest SDK installed on the machine by default, even...
Read more >
dotnet run command - .NET CLI
The dotnet run command provides a convenient option to run your application from the source code.
Read more >
Configuration in ASP.NET Core
Command-line arguments using the Command-line configuration provider. ... The dotnet run command must be run in the project directory.
Read more >
Main() and command-line arguments
Learn about Main() and command-line arguments. The 'Main' method is the entry point of an executable program.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found