Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet CLI help command does not show package #44877

Open
ajpinedam opened this issue Nov 14, 2024 · 5 comments
Open

dotnet CLI help command does not show package #44877

ajpinedam opened this issue Nov 14, 2024 · 5 comments
Assignees

Comments

@ajpinedam
Copy link

Describe the bug

When executing the Help command or -h in the dotnet CLI the package SDK command does show on the list even though it's available.

Image

To Reproduce

dotnet help 

or

dotnet -h

Tested on Windows PS and macOS both with version 9.0.100

Exceptions (if any)

Further technical details

  • Include the output of dotnet --info

.NET SDK:
Version: 9.0.100
Commit: 59db016
Workload version: 9.0.100-manifests.c6f19616
MSBuild version: 17.12.7+5b8665660

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100\

.NET workloads installed:
[android]
Installation Source: SDK 9.0.100, VS 17.12.35410.144, VS 17.11.35327.3
Manifest Version: 35.0.7/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.7\WorkloadManifest.json
Install Type: Msi

[aspire]
Installation Source: SDK 9.0.100, VS 17.12.35410.144, VS 17.11.35327.3
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: SDK 9.0.100, VS 17.12.35410.144, VS 17.11.35327.3
Manifest Version: 18.0.9617/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.0.9617\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: SDK 9.0.100, VS 17.12.35410.144, VS 17.11.35327.3
Manifest Version: 18.0.9617/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.0.9617\WorkloadManifest.json
Install Type: Msi

[maui-windows]
Installation Source: SDK 9.0.100, VS 17.12.35410.144, VS 17.11.35327.3
Manifest Version: 9.0.0/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.0\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4

.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
7.0.120 [C:\Program Files\dotnet\sdk]
7.0.410 [C:\Program Files\dotnet\sdk]
8.0.206 [C:\Program Files\dotnet\sdk]
8.0.403 [C:\Program Files\dotnet\sdk]
9.0.100-rc.2.24474.11 [C:\Program Files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0-rc.2.24474.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0-rc.2.24473.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.35 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0-rc.2.24474.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Workloads untriaged Request triage from a team member labels Nov 14, 2024
@marcpopMSFT marcpopMSFT removed untriaged Request triage from a team member Area-Workloads labels Nov 14, 2024
@marcpopMSFT
Copy link
Member

@Nigusu-Allehu probably just need to new up a DocumentedCommand for it to show in the help.

@ajpinedam
Copy link
Author

ajpinedam commented Nov 14, 2024

I started investigating locally and found that:

Updates would be added to this file, which is where the help information comes from: https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/commands/dotnet-help/HelpUsageText.cs.

Also, the https://github.com/dotnet/sdk/blob/main/src/Cli/dotnet/commands/dotnet-help/LocalizableStrings.resx would need to be updated to add the relevant string resource.

One of the tests would also need to be updated to reflect the new output: https://github.com/dotnet/sdk/blob/main/test/dotnet-help.Tests/GivenThatIWantToShowHelpForDotnetCommand.cs

cc: @marcpopMSFT

@ajpinedam
Copy link
Author

Btw: can I work on this issue? It would be a good first issue for me in this repo.

@JonDouglas
Copy link

JonDouglas commented Nov 14, 2024

@ajpinedam yeah for sure. i think there's a nuance thing to point out here.

maybe we need to alias this to dotnet search package or similar and then documetn the search part. most nuget commands today are dotnet <verb> <noun> and the dotnet package search is opposite.

i will defer to @baronfel our great CLI czar baron for more insight

@baronfel
Copy link
Member

I'd definitely accept a contribution here @ajpinedam! You found all the relevant places already.

I don't think we need to do the aliasing that @JonDouglas mentioned as part of this ticket - we're slowly unifying the CLI to noun-first commands so 'package' is already set. The main issue was just this old, static help string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants