diff --git a/eng/restore-toolset.ps1 b/eng/restore-toolset.ps1 index 56dc6b918069..c53bd374b52f 100644 --- a/eng/restore-toolset.ps1 +++ b/eng/restore-toolset.ps1 @@ -153,7 +153,7 @@ function CleanOutStage0ToolsetsAndRuntimes { Remove-Item (Join-Path $aspnetRuntimePath "$majorVersion.*") -Recurse Remove-Item (Join-Path $coreRuntimePath "$majorVersion.*") -Recurse Remove-Item (Join-Path $wdRuntimePath "$majorVersion.*") -Recurse - Remove-Item (Join-Path $sdkPath "$majorVersion.*") -Recurse + Remove-Item (Join-Path $sdkPath "*") -Recurse Remove-Item (Join-Path $dotnetRoot "packs") -Recurse Remove-Item (Join-Path $dotnetRoot "sdk-manifests") -Recurse Remove-Item (Join-Path $dotnetRoot "templates") -Recurse diff --git a/eng/restore-toolset.sh b/eng/restore-toolset.sh index 378d3f24b00f..be8031325869 100644 --- a/eng/restore-toolset.sh +++ b/eng/restore-toolset.sh @@ -93,7 +93,7 @@ function CleanOutStage0ToolsetsAndRuntimes { local aspnetRuntimePath="$dotnetRoot/shared/Microsoft.AspNetCore.App/$majorVersion.*" local coreRuntimePath="$dotnetRoot/shared/Microsoft.NETCore.App/$majorVersion.*" local wdRuntimePath="$dotnetRoot/shared/Microsoft.WindowsDesktop.App/$majorVersion.*" - local sdkPath="$dotnetRoot/sdk/$majorVersion.*" + local sdkPath="$dotnetRoot/sdk/*" if [ -f "$versionPath" ]; then local lastInstalledSDK=$(cat $versionPath)