Skip to content

[9.0.1xx] Use dotnetup preview for SDK acquisition - #55642

Open
nagilson wants to merge 1 commit into
dotnet:release/9.0.1xxfrom
nagilson:nagilson/dotnetup-preview-release-9.0.1xx
Open

[9.0.1xx] Use dotnetup preview for SDK acquisition#55642
nagilson wants to merge 1 commit into
dotnet:release/9.0.1xxfrom
nagilson:nagilson/dotnetup-preview-release-9.0.1xx

Conversation

@nagilson

@nagilson nagilson commented Aug 6, 2026

Copy link
Copy Markdown
Member

Please see #55640

@azure-pipelines

Copy link
Copy Markdown
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 nagilson changed the title Use dotnetup preview for SDK acquisition [9.0.1xx] Use dotnetup preview for SDK acquisition Aug 6, 2026
@nagilson
nagilson force-pushed the nagilson/dotnetup-preview-release-9.0.1xx branch 2 times, most recently from 062974b to 9dec43f Compare August 6, 2026 21:59
@nagilson
nagilson marked this pull request as ready for review August 6, 2026 22:21
Copilot AI review requested due to automatic review settings August 6, 2026 22:21
@azure-pipelines

Copy link
Copy Markdown
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
nagilson enabled auto-merge August 6, 2026 22:21
@nagilson
nagilson requested a review from a team August 6, 2026 22:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread eng/restore-toolset.sh
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 thread eng/configure-toolset.sh Outdated
Comment on lines +17 to +19
if [[ "$restore" != true || "${from_vmr:-false}" == true || -z "$dotnet_sdk_version" ]]; then
return
fi
Comment thread eng/restore-toolset.ps1
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 thread eng/configure-toolset.ps1 Outdated
Comment on lines +16 to +18
if ((-not $restore) -or ((Test-Path variable:fromVMR) -and $fromVMR) -or [string]::IsNullOrEmpty($dotnetSdkVersion)) {
return
}
Comment thread eng/restore-toolset.ps1 Outdated
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 thread eng/dotnetup-shared.ps1
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 thread eng/restore-toolset.sh
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 thread eng/restore-toolset.ps1
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 thread eng/restore-toolset.ps1
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"
@nagilson

nagilson commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
3 pipeline(s) were filtered out due to trigger conditions.

@nagilson
nagilson force-pushed the nagilson/dotnetup-preview-release-9.0.1xx branch from 9dec43f to e20d67f Compare August 7, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants