[build] clean up past .NET 5 installations #5103
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: https://docs.microsoft.com/dotnet/core/tools/dotnet-install-script
The
use-dot-net.yamltemplate is leaving behind old installations of.NET 5:
We are currently using
dotnet-install.shordotnet-install.ps1toinstall nightly builds of .NET 5. These scripts basically download a
.zipfile and extract them.I added a new
remove_dotnetparameter to delete thedotnetdirectory completely. This will ensure we only have the versions of
.NET Core 3.x and .NET 5 specified in our build definition.
Usage would look like:
Simply deleting the directories is similar to what this script is
doing here:
https://github.com/dotnet/sdk/blob/feae865a0614026d72ed9a9558d0111e5fcd5765/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh#L35