`dotnet --info` should also show workload info
See original GitHub issueBackground
The dotnet
CLI tool has many command line options for showing info about what is installed:
sdk-options:
...
--info Display .NET information.
--list-runtimes Display the installed runtimes.
--list-sdks Display the installed SDKs.
--version Display .NET SDK version in use.
The most detailed of those options is --info
, which includes the details of all the other top-level options, and looks like this:
.NET SDK:
Version: 7.0.200
Commit: 534117727b
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.200\
Host:
Version: 7.0.3
Architecture: x64
Commit: 0a2bda10e8
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.309 [C:\Program Files\dotnet\sdk]
7.0.200 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
...
Microsoft.WindowsDesktop.App 7.0.3 [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
But wait, there’s even more info for workloads! The versions of workloads are fundamental regarding what is installed. Info on it is available via the dotnet workload list
command:
Installed Workload Id Manifest Version Installation Source
---------------------------------------------------------------------
maccatalyst 16.2.1035/7.0.100 VS 17.6.33417.168
runtimes-windows 7.0.3/7.0.100 VS 17.6.33417.168
maui-ios 52.1.0/7.0.100 VS 17.6.33417.168
maui-windows 52.1.0/7.0.100 VS 17.6.33417.168
maui-maccatalyst 52.1.0/7.0.100 VS 17.6.33417.168
android 33.0.39/7.0.100 VS 17.6.33417.168
ios 16.2.1035/7.0.100 VS 17.6.33417.168
maui-android 52.1.0/7.0.100 VS 17.6.33417.168
Problem
Quite often when Microsoft receives bug reports we ask users to provide the output of dotnet --info
, but for some scenarios that is incomplete information because of the lack of workload details. Then there is a back-and-forth between the customer and Microsoft to get additional details on workloads.
Proposed solution
I propose that dotnet --info
also include the list of installed workloads.
The output could look something like this:
.NET SDK:
... various stuff ...
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
6.0.309 [C:\Program Files\dotnet\sdk]
7.0.200 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
...
Microsoft.WindowsDesktop.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
.NET workloads installed: <-------------------------------------------------------------------- THIS IS THE NEW PART
Installed Workload Id Manifest Version Installation Source
---------------------------------------------------------------------
maccatalyst 16.2.1035/7.0.100 VS 17.6.33417.168
runtimes-windows 7.0.3/7.0.100 VS 17.6.33417.168
maui-ios 52.1.0/7.0.100 VS 17.6.33417.168
maui-windows 52.1.0/7.0.100 VS 17.6.33417.168
maui-maccatalyst 52.1.0/7.0.100 VS 17.6.33417.168
android 33.0.39/7.0.100 VS 17.6.33417.168
ios 16.2.1035/7.0.100 VS 17.6.33417.168
maui-android 52.1.0/7.0.100 VS 17.6.33417.168
Other architectures found:
... [more stuff]
Issue Analytics
- State:
- Created 7 months ago
- Comments:19 (19 by maintainers)
Top GitHub Comments
I get that (and generally agree), but I also don’t think the current model lets us have a seamless layout of the runtime-provided parts, and the SDK-provided parts. I’m worried that if the SDK fills the screen with workload (and maybe CLI-environment-variable in the future?) related output, the useful output from the runtime will be pushed to the bottom and the overall layout won’t make sense to the user.
For now I think it’s ok for us to just add installed workload information to the SDK’s layout, but we should consider what better way of laying out/handshaking between the runtime and the SDK information here might look like.
Resolving for now as it is fixed as requested but there may be a better design in the future but we’ll wait to get feedback.