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.

[ 6.0.100-preview.1.21077.11] dotnet hash -h displays help for dotnet SDK not for dotnet hash

See original GitHub issue

Application Name: dotnet hash global tool app OS: Windows 10 RS5 CPU: X64 .NET Build Number: 6.0.100-preview.1.21077.11 DevDiv bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1271105

Verify Scenarios: 1). Windows 10 RS5 X64 + .NET Core SDK build 6.0.100-preview.1.21077.11: Fail 2). Windows 10 RS5 X64 + .NET Core SDK build 5.0.102: Pass

Repro steps

  1. Install app : dotnet tool install TheBlueSky.DotNet.Tools.SwiftHash --global
  2. Run : dotnet hash -h

Expected Result: It should display help menu for dotnet hash global tool app

Actual Result: It displays help menu for dotnet SDK, same as dotnet -h

More Examples

dotnet hash -h               Displays dotnet SDK help menu
dotnet hash -?               Displays dotnet SDK help menu
dotnet hash --help        Displays dotnet SDK help menu
dotnet hash -help         OK
dotnet-hash -h              OK

@dotnet-actwx-bot @dotnet/compat

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
jiangzeng01commented, Feb 5, 2021

@sfoslund We tried with latest master daily build, your fix for “-h” work fine, but we think this issue is not only related to ‘-h’, it will repro whenever the following ‘sdk-options’ conflicts with global tool app’s options.

sdk-options:
  -d|--diagnostics  Enable diagnostic output.
  -h|--help         Show command line help.
  --info            Display .NET information.
  --list-runtimes   Display the installed runtimes.
  --list-sdks       Display the installed SDKs.
  --version         Display .NET SDK version in use.

Another example about global tool option conflict with sdk option: Repro steps:

  1. Install a global tool app, for example dotnet-ignore :
  2. dotnet tool install –g dotnet-ignore
  3. run this command : dotnet ignore --version

Expected Result: it should show dotnet ignore tool version

Actual Result: It shows dotnet sdk version.

Our trying:

C:\WINDOWS\system32>dotnet ignore --version
6.0.100-preview.1.21104.9

C:\WINDOWS\system32>dotnet-ignore --version
1.0.6

C:\WINDOWS\system32>dotnet --version
6.0.100-preview.1.21104.9

(dotnet ignore --version should work the same way with dotnet-ignore --version, but it is working as dotnet --version here)

Findings: This issue happens not only for “-h” or “–version”, if any global tool has the same options like “-d” or “–info” with sdk-option, then it will also conflict.

0reactions
jiangzeng01commented, Feb 19, 2021

Verified with master branch build: 6.0.100-preview.2.21119.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

bank-vaults [vault-secrets-webhook] service account name not ...
Not able to mutate secrets if the operator (vault) and the webhook are in ... [ 6.0.100-preview.1.21077.11] dotnet hash -h displays help for...
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