.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).
To alleviate some of the pain of leftover workload packs we added dotnet workload clean. Read more here
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.
.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
To alleviate some of the pain of leftover workload packs we added
dotnet workload clean
. Read more hereThe 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
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.