Skip to content

[8.0.4xx] Use dotnetup preview for SDK acquisition - #55644

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

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

Conversation

@nagilson

@nagilson nagilson commented Aug 6, 2026

Copy link
Copy Markdown
Member

@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 force-pushed the nagilson/dotnetup-preview-release-8.0.4xx branch from a5497b0 to 837737b Compare August 6, 2026 19:26
@nagilson
nagilson force-pushed the nagilson/dotnetup-preview-release-8.0.4xx branch from 837737b to 1cb2713 Compare August 6, 2026 21:59
@nagilson
nagilson marked this pull request as ready for review August 6, 2026 22:20
Copilot AI review requested due to automatic review settings August 6, 2026 22:20
@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

This PR backports the “use dotnetup preview for SDK acquisition” flow onto the 8.0.4xx servicing branch by introducing repo-owned helper scripts and updating toolset bootstrap/restore scripts to prefer dotnetup (with caching and architecture handling) for SDK/runtime installation.

Changes:

  • Add shared, repo-owned helpers for architecture detection and dotnetup acquisition (bash + PowerShell).
  • Update toolset bootstrap (configure-toolset.*) to install the pinned SDK(s) via dotnetup when restoring.
  • Update toolset restore (restore-toolset.*) to install test runtimes via dotnetup with cross-arch handling and install-script fallback.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
eng/sdk-tools.sh Adds repo-owned bash helpers (native arch detection, musl detection).
eng/sdk-tools.ps1 Adds repo-owned PowerShell helpers for native/process architecture detection.
eng/dotnetup-shared.sh Introduces shared bash functions to cache/acquire dotnetup and run commands without errexit.
eng/dotnetup-shared.ps1 Introduces shared PowerShell functions to cache/acquire dotnetup and invoke it safely.
eng/configure-toolset.sh Uses dotnetup to pre-install bootstrap SDK(s) from global.json during restore.
eng/configure-toolset.ps1 Uses dotnetup to pre-install bootstrap SDK(s) from global.json during restore.
eng/restore-toolset.sh Switches test runtime installation to dotnetup with cross-arch sidecar support and fallback.
eng/restore-toolset.ps1 Switches test runtime installation to dotnetup with cross-arch sidecar support and fallback.
.gitignore Ignores eng/dotnetup/ dotnetup build/output directory.
Suppressed comments (1)

eng/restore-toolset.ps1:104

  • The generated sdk-build-env.ps1 no longer sets DOTNET_MULTILEVEL_LOOKUP=0. Since the repo bootstrapping logic sets this to keep dotnet from probing machine-wide locations, omitting it here can make interactive shells behave differently from CI/toolset initialization.
# https://aka.ms/vs/unsigned-dotnet-debugger-lib
`$env:VSDebugger_ValidateDotnetDebugLibSignatures=0

`$env:DOTNET_ROOT="$env:DOTNET_INSTALL_DIR"
`$env:DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR="$env:DOTNET_INSTALL_DIR"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread eng/configure-toolset.sh
fi
done < "$repo_root/global.json"

local dotnet_root="$repo_root.dotnet"
Comment thread eng/restore-toolset.ps1
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/restore-toolset.sh
Comment on lines 241 to 245
scriptContents="
#!/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 85
REM https://aka.ms/vs/unsigned-dotnet-debugger-lib
set VSDebugger_ValidateDotnetDebugLibSignatures=0

set DOTNET_ROOT=$env:DOTNET_INSTALL_DIR
set DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$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 1 pipeline(s).
4 pipeline(s) were filtered out due to trigger conditions.

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