-
Couldn't load subscription status.
- Fork 1.2k
Description
We should add a dotnet workload --version command, which will output the workload version (AKA workload set version). This command will only output the version and nothing else, similar to dotnet --version.
Additionally, the dotnet --info and dotnet workload --info commands should be updated to display the workload version. From the design, this would look like this:
> dotnet --info
.NET SDK:
Version: 8.0.201
Commit: <commit>
Workload version: 8.0.201
<further information>
> dotnet workload --info
Workload version: 8.0.201
[wasm-tools]
Installation Source: SDK 8.0.100-preview.4
Manifest Version: 8.0.0-preview.4.23181.9/8.0.100-preview.4
Manifest Path: C:\git\dotnet-sdk-main\.dotnet\sdk-manifests\8.0.100-preview.4\microsoft.net.workload.mono.toolchain.current\WorkloadManifest.json
Install Type: FileBased
Implementation
Currently, the SdkDirectoryWorkloadManifestProvider class is responsible for selecting the workload version to use. Probably it (and possibly IWorkloadManifestProvider) should add a method that returns the workload version.
When no workload set is installed, a workload version should still be displayed. Per the design:
In this case, when a workload set version is needed, the .NET SDK will create a version using the .NET SDK feature band, the pre-release specifier
manifests, and a hash of the manifest IDs and versions. For example,8.0.200-manifests.9e7f4b93.