[9.0.1xx] Use dotnetup preview for SDK acquisition - #55642
Open
nagilson wants to merge 1 commit into
Open
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
nagilson
force-pushed
the
nagilson/dotnetup-preview-release-9.0.1xx
branch
2 times, most recently
from
August 6, 2026 21:59
062974b to
9dec43f
Compare
nagilson
marked this pull request as ready for review
August 6, 2026 22:21
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Backports the “use dotnetup preview for SDK/runtime acquisition” work to the 9.0.1xx servicing branch by integrating dotnetup-based installs into the repo’s toolset/bootstrap scripts and ensuring cross-arch test runtimes are packaged correctly for Helix.
Changes:
- Add shared dotnetup acquisition helpers for bash and PowerShell, plus shared arch/musl detection helpers.
- Switch bootstrap SDK installation and test runtime installation to prefer dotnetup (with dotnet-install fallback).
- Add an overlay target to copy cross-architecture test runtimes into the test redist layout; ignore
eng/dotnetup/output.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Layout/redist/targets/OverlaySdkOnLKG.targets | Adds a target to overlay cross-arch test runtimes into the test payload layout. |
| eng/sdk-tools.sh | Adds shared bash helpers (native arch detection, musl detection). |
| eng/sdk-tools.ps1 | Adds shared PowerShell helpers for native/process arch detection. |
| eng/dotnetup-shared.sh | Adds shared bash helpers for caching/acquiring dotnetup and running commands without set -e. |
| eng/dotnetup-shared.ps1 | Adds shared PowerShell helpers for caching/acquiring dotnetup and invoking dotnetup safely. |
| eng/configure-toolset.sh | Adds dotnetup-based bootstrap SDK installation into repo-local .dotnet. |
| eng/configure-toolset.ps1 | Adds dotnetup-based bootstrap SDK installation into repo-local .dotnet. |
| eng/restore-toolset.sh | Updates runtime acquisition to use dotnetup, supports cross-arch sidecar runtimes, and updates env script output. |
| eng/restore-toolset.ps1 | Updates runtime acquisition to use dotnetup, supports cross-arch sidecar runtimes, and updates env script/VS shortcut output. |
| .gitignore | Ignores eng/dotnetup/ download/install directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
11
to
15
| # The following frameworks and tools are used only for testing. | ||
| # Do not attempt to install them in source build. | ||
| if [[ $properties == *"ArcadeBuildFromSource=true"* || $product_build == true || $properties == *"DotNetBuildRepo=true"* ]]; then | ||
| # Do not attempt to install them when building in the VMR. | ||
| if [[ ${from_vmr:-false} == true ]]; then | ||
| return | ||
| fi |
Comment on lines
+17
to
+19
| if [[ "$restore" != true || "${from_vmr:-false}" == true || -z "$dotnet_sdk_version" ]]; then | ||
| return | ||
| fi |
Comment on lines
+15
to
+19
| # The following frameworks and tools are used only for testing. | ||
| # Do not attempt to install them when building in the VMR. | ||
| if ((Test-Path variable:fromVMR) -and $fromVMR) { | ||
| return | ||
| } |
Comment on lines
+16
to
+18
| if ((-not $restore) -or ((Test-Path variable:fromVMR) -and $fromVMR) -or [string]::IsNullOrEmpty($dotnetSdkVersion)) { | ||
| return | ||
| } |
Comment on lines
+135
to
+139
| $scriptPath = Join-Path $ArtifactsDir 'sdk-build-env.ps1' | ||
| $slnPath = Join-Path $RepoRoot 'sdk.slnx' | ||
| $commandToLaunch = "& '$scriptPath'; & '$devenvPath' '$slnPath'" | ||
| $powershellPath = '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe' | ||
| $shortcutPath = Join-Path $ArtifactsDir 'VS with sdk.slnx.lnk' |
Comment on lines
+66
to
+80
| function Invoke-DotnetupNativeCommand([scriptblock]$Command) { | ||
| if (-not (Test-Path Variable:LASTEXITCODE)) { $global:LASTEXITCODE = 0 } | ||
| $ErrorActionPreference = 'Continue' | ||
| $PSNativeCommandUseErrorActionPreference = $false | ||
| try { | ||
| # Write command output to the host and prevent it from being returned alongside the exit code | ||
| & $Command | Out-Host | ||
| return $LASTEXITCODE | ||
| } | ||
| catch { | ||
| Write-Host "dotnetup command failed: $($_.Exception.Message)" -ForegroundColor Yellow | ||
| if ($LASTEXITCODE -ne 0) { return $LASTEXITCODE } | ||
| return 1 | ||
| } | ||
| } |
Comment on lines
242
to
246
| #!/usr/bin/env bash | ||
| export DOTNET_MULTILEVEL_LOOKUP=0 | ||
|
|
||
| export DOTNET_ROOT=$DOTNET_INSTALL_DIR | ||
| export DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$DOTNET_INSTALL_DIR | ||
|
|
Comment on lines
+81
to
84
| REM https://aka.ms/vs/unsigned-dotnet-debugger-lib | ||
| set VSDebugger_ValidateDotnetDebugLibSignatures=0 | ||
|
|
||
| set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR |
Comment on lines
+100
to
103
| # https://aka.ms/vs/unsigned-dotnet-debugger-lib | ||
| `$env:VSDebugger_ValidateDotnetDebugLibSignatures=0 | ||
|
|
||
| `$env:DOTNET_ROOT="$env:DOTNET_INSTALL_DIR" |
Member
Author
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. |
Open
3 tasks
nagilson
force-pushed
the
nagilson/dotnetup-preview-release-9.0.1xx
branch
from
August 7, 2026 17:32
9dec43f to
e20d67f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please see #55640