Skip to content

Comments

Add dotnetup --info, dotnetup --version, dotnetup list #52717

Merged
nagilson merged 25 commits intodotnet:release/dnupfrom
nagilson:nagilson-dotnetup-info
Feb 3, 2026
Merged

Add dotnetup --info, dotnetup --version, dotnetup list #52717
nagilson merged 25 commits intodotnet:release/dnupfrom
nagilson:nagilson-dotnetup-info

Conversation

@nagilson
Copy link
Member

Resolves #50613

Please see the added documentation specs for options provided.
A machine readable format via --json is added alongside a human readable version.

adds architecture, sha, and version for debugging customer issues more easily
@nagilson nagilson changed the title Add dotnetup --info, dotnetup --version, dotnetup list` Add dotnetup --info, dotnetup --version, dotnetup list Jan 28, 2026
@nagilson
Copy link
Member Author

nagilson commented Jan 29, 2026

Hm, I'm wondering why we're running SDK tests on the dnup branch.
image
Anyway, this is part of why I didn't intend to do so 😁

Edit: Ah, I changed copilot instructions which are in the sdk code root.

@nagilson nagilson marked this pull request as ready for review January 29, 2026 17:54
Copilot AI review requested due to automatic review settings January 29, 2026 17:54
nagilson and others added 3 commits January 29, 2026 11:08
Co-authored-by: Copilot <[email protected]>
This allows --info to have options like --json where it cant do that if its a bool. A bit hacky and it doesn't display on the root command but I think that's acceptable.
Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. For things like using Spectre.Console to do the formatting, feel free to file an issue for that if you don't want to hold up this PR.

<NoWarn>$(NoWarn);CS8002</NoWarn>

<!-- dotnetup versioning -->
<VersionPrefix>0.0.1</VersionPrefix>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Microsoft.Dotnet.Installation.csproj also has version information in it. Could we unify these into a Directory.Build.props file or something?

We would probably want to use 0.1.1 as the version so that we don't publish out of order package versions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've bumped the version, good idea! Do you mean to unify the 2 versions or move the version handling for both into one space? I think we can track that elsewhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should define the version in one place and have it affect both the NuGet package and the version of dotnetup. I think Directory.Build.props in the src\Installer directory is probably the place to do that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotchu! #52795
To make things simpler to review and not block other work, filed this here.

Comment on lines +22 to +24
InstallComponent.Runtime => "Microsoft.NETCore.App",
InstallComponent.ASPNETCore => "Microsoft.AspNetCore.App",
InstallComponent.WindowsDesktop => "Microsoft.WindowsDesktop.App",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably use something like the following for human-readable names:

  • .NET Core Runtime
  • ASP.NET Runtime
  • .NET Windows Desktop Runtime

@baronfel might know if there are better / official names.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could go either way on this but lean against this change - dotnet --list-runtimes and dotnet --info uses the more verbose text and I wanted to maintain parity.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the official names, but users almost never directly interact with the 'full' names. It's all implicit, driving by the use of the various MSBuild SDK's they use in their projects. Human-readable is IMO the way to go here, but I wouldn't use .NET Core Runtime, ASP.NET Runtime, or .NET Windows Desktop Runtime for anything around user input. We should have shorter, punchier names for them for use in flags/options, and these names are what I think we should be surfacing.

Proposal:

  • Microsoft.NETCore.App => dotnet (runtime)
  • Microsoft.AspNetCore.App => aspnet (runtime)
  • Microsoft.WindowsDesktop.App => windowsdesktop (runtime)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this below but kept the json as full names as they inform the directories of the installs and I can think of a lot of code that relies on those values 🤔

@dsplaisted
Copy link
Member

@nagilson Is this ready to merge? I think we can ignore the dotnet-sdk-public-ci failures since they don't apply to this branch. Do you want to /ba-g it? Or I can also force merge it if needed.

@nagilson
Copy link
Member Author

nagilson commented Feb 3, 2026

/ba-g failures are known issues with the sdk repo

@nagilson nagilson disabled auto-merge February 3, 2026 17:57
@nagilson nagilson enabled auto-merge February 3, 2026 17:57
@nagilson nagilson disabled auto-merge February 3, 2026 17:57
@nagilson nagilson merged commit 033849a into dotnet:release/dnup Feb 3, 2026
22 of 30 checks passed
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

Successfully merging this pull request may close these issues.

3 participants