Now that we have workload sets, users have three questions about them that we can't easily answer:
- what workload sets are available?
- what's in workload set XYZ?
- what workload set contains version 8.0.1 of Aspire?
We will provide CLI commands that enable users to learn the answers to all of those questions.
What workload set versions are available?
Workload sets are shipped as a specific NuGet package and are selected by users by version, either implicitly or explicitly. We should provide a command to list the top N versions of the workload set package available on the selected feeds so that users know what versions are available.
What's in workload set XYZ?
Users want to know what versions of the workloads are bundled in each workload set for a number of reasons. We'll tackle this in two parts:
As an example of what this could look like, let's take the existing output from dotnet workload list, which lists the versions of workloads that are installed locally. This output is from my local Windows desktop, which is not configured to use workload sets:
$dotnet workload list
Installed Workload Id Manifest Version Installation Source
----------------------------------------------------------------------------------------------------------------
aspire 9.0.0-preview.2.24163.9/9.0.100-preview.1 VS 17.10.35027.167, VS 17.11.35111.106
android 34.99.0-preview.1.151/9.0.100-preview.1 VS 17.11.35111.106
maui-windows 9.0.0-preview.1.9973/9.0.100-preview.1 VS 17.11.35111.106
maccatalyst 17.2.9088-net9-p1/9.0.100-preview.1 VS 17.11.35111.106
ios 17.2.9088-net9-p1/9.0.100-preview.1 VS 17.11.35111.106
Use `dotnet workload search` to find additional workloads to install.
The major difference that the proposed "what's in workload set X" command would have compared to this is:
- it would list all workloads in the set, not the installed subset
- it would not need to list the Manifest Version because all listed workloads would have the same effective manifest version
What workload contains version X of component or workload Y?
AKA a reverse-lookup, inverting the previous command. Once we have the data to power the above command, we should be able to use it to look up the matching workload set version for a given workload version (e.g. Aspire 8.0.1).
This question is the least fleshed-out but we hope this gives enough of an idea to have a discussion.
Automatically install a workload set that contains a given workload version
Building on the previous 3 commands, users should be able to do something like dotnet workload install aspire@8.0.1 maui@46.8 and the tooling should find the workload set (or sets) that contains both of those and install that workload set. Potentially prompting the user to make a choice if multiple valid sets are found.
If multiple workloads are specified, the workload set used must satisfy all of them.
We should explicitly show in the usage section of the CLI help that there are two modes of the dotnet workload install command - one for workload sets and one for workloads - this will require customizing the help layout, and that's something we've wanted in several other scenarios.
Open questions
- What should the main noun used for these commands be? Above I have used
sets but @dsplaisted's suggestion of versions is also very reasonable and has the upside of not introducing the workload sets concept to the CLI grammar or to users.
- What is the exact structure of the content that we will embed into the workload sets manifest package and the workload packages for describing their dependencies?
- What is a reasonable place to store this data on the NuGet package metadata?
- Right now we are investigating the release notes field
- prior art on the id@version syntax exists in the template install command:
<id>::<version>
Now that we have workload sets, users have three questions about them that we can't easily answer:
We will provide CLI commands that enable users to learn the answers to all of those questions.
What workload set versions are available?
Workload sets are shipped as a specific NuGet package and are selected by users by version, either implicitly or explicitly. We should provide a command to list the top N versions of the workload set package available on the selected feeds so that users know what versions are available.
dotnet workload search versionsMicrosoft.NET.Workloads.{SDKFeatureBand}of the currently-used SDK--takecommand to limit the number of versions returned (based on prior art fromdotnet package search --take, I'm not personally a fan of this and would consider--count).--format <table|json>option and will emit the results as either a JSON array of strings or a terminal-formatted table using our existing helpersdotnet workload install --versionanddotnet workload update --versionfor workload setsWhat's in workload set XYZ?
Users want to know what versions of the workloads are bundled in each workload set for a number of reasons. We'll tackle this in two parts:
dotnet workload search sets <workload set version>--format <table|json>option that will emit the results as either a JSON array of objects describing each workload in the workload set, or as a table using our existing helpersAs an example of what this could look like, let's take the existing output from
dotnet workload list, which lists the versions of workloads that are installed locally. This output is from my local Windows desktop, which is not configured to use workload sets:The major difference that the proposed "what's in workload set X" command would have compared to this is:
What workload contains version X of component or workload Y?
AKA a reverse-lookup, inverting the previous command. Once we have the data to power the above command, we should be able to use it to look up the matching workload set version for a given workload version (e.g. Aspire 8.0.1).
dotnet workload search sets --component <component ID and version>, where<component ID and version>is a structure like<component@version>- for exampleAspire@8.0.1.dotnet workload search sets --component aspire@8.0.1 --component maui-android@17.2.1--componentoption easily as welldotnet workload search sets aspire@8.0.1 maui-android@17.2.1dotnet workload search versions xcode@9.0This question is the least fleshed-out but we hope this gives enough of an idea to have a discussion.
Automatically install a workload set that contains a given workload version
Building on the previous 3 commands, users should be able to do something like
dotnet workload install aspire@8.0.1 maui@46.8and the tooling should find the workload set (or sets) that contains both of those and install that workload set. Potentially prompting the user to make a choice if multiple valid sets are found.If multiple workloads are specified, the workload set used must satisfy all of them.
We should explicitly show in the
usagesection of the CLI help that there are two modes of thedotnet workload installcommand - one for workload sets and one for workloads - this will require customizing the help layout, and that's something we've wanted in several other scenarios.Open questions
setsbut @dsplaisted's suggestion ofversionsis also very reasonable and has the upside of not introducing the workload sets concept to the CLI grammar or to users.<id>::<version>