dotnet / dotnet/sdk

Add `dotnetup sdk list` and `dotnetup runtime list` commands

Open
#52,790 0 comments 0 reactions 0 assignees View on GitHub
Area-dotnetup
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

## Summary

As discussed in https://github.com/dotnet/sdk/pull/52717#discussion_r2755551475, we should add component-specific list commands to dotnetup.

## Current State

Currently, `dotnetup list` shows all installed components (SDKs, runtimes, ASP.NET, Windows Desktop).

## Proposed Commands

- `dotnetup sdk list` - List only installed SDKs
- `dotnetup runtime list` - List only installed runtimes
- Potentially: `dotnetup aspnetcore list`, `dotnetup windowsdesktop list`

## Architecture Considerations

Per @baronfel's feedback:
> Having a top-level list is great, but _logically_ it should be similar to calling `dotnetup list`, and we should be prepared code-architecture-wise to support listing SDKs and Runtimes (and maybe more types of components in the future).

The implementation should:
1. Keep `dotnetup list` as the top-level command that lists all components
2. Add `dotnetup sdk list` as equivalent to filtering `dotnetup list` to SDKs only
3. Add `dotnetup runtime list` for runtimes only
4. Support future component types

## Notes

This is intentionally different from `dotnet --list-sdks` and `dotnet --list-runtimes` syntax, as those are "among my least favorite parts of our current CLI experience" (@baronfel).

## Related

- PR: #52717

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.