Add support for workloads as part of the uninstall tool
- Dominant language
- C#
- Stars
- 774
- Forks
- 72
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
.NET SDK workloads are optional extensions to the SDK itself. They were designed this way to allow for including pieces that are too big to be included in the default SDK (the wasm-tools workload includes packages that are many times bigger than the current SDK for example).
As you install new workloads, the garbage collector in the workloads process to trigger to clean up old workload packs no longer in use. Additionally, on windows, the admin install has a finalizer that runs on uninstall that attempts to clean up worklaods before being removed. We've found that for various reasons, this doesn't always work (if you've installed a new SDK band, you're using a file-based install, etc).
Read more [here](https://github.com/dotnet/designs/blob/main/accepted/2021/workloads/workload-installation.md#workload-installation-process)
To alleviate some of the pain of leftover workload packs we added `dotnet workload clean`. Read more [here](https://github.com/dotnet/sdk/blob/main/documentation/general/workloads/workload-clean.md)
The guidance for removing an SDK with workloads to get to a clean state is the following:
- `dotnet workload uninstall` for each installed workload in your SDK band (repeat for other SDKs as needed)
- `dotnet workload clean --all`
- Then remove the SDK
This issue proposes adding workloads support to the uninstall tool to help you track what you have installed across the current and other SDK bands as well as remove them.
Contributor guide
Assessment
This issue has not been assessed yet.