diff --git a/build.ps1 b/build.ps1 index cea9861d52..4ea50f5157 100644 --- a/build.ps1 +++ b/build.ps1 @@ -362,9 +362,10 @@ try { $toolsetBuildProj = InitializeToolset - $sdkPath = [IO.Path]::Combine($env:DOTNET_INSTALL_DIR, 'sdk', '3.1.102') + $dotnetInstallDir = Join-Path $RepoRoot ".dotnet" + $sdkPath = [IO.Path]::Combine($dotnetInstallDir, 'sdk', '3.1.102') if (!(Test-Path $sdkPath)) { - InstallDotNetSdk $env:DOTNET_INSTALL_DIR '3.1.102-servicing-014873' -skipNonVersionedFiles $true + InstallDotNetSdk $dotnetInstallDir '3.1.102-servicing-014873' -skipNonVersionedFiles $true } $restore = $tmpRestore diff --git a/build.sh b/build.sh index de95cda110..430a533f9e 100755 --- a/build.sh +++ b/build.sh @@ -316,7 +316,7 @@ restore=true InitializeToolset -InstallDotNetSdk "$DOTNET_INSTALL_DIR" "3.1.102-servicing-014873" +InstallDotNetSdk "$repo_root/.dotnet" "3.1.102-servicing-014873" restore=$_tmp_restore=