Skip to content

Fix Unix build bootstrap runtime resolution for test apphosts#8198

Merged
Evangelink merged 2 commits into
mainfrom
copilot/fix-build-issues-and-broken-tests
May 14, 2026
Merged

Fix Unix build bootstrap runtime resolution for test apphosts#8198
Evangelink merged 2 commits into
mainfrom
copilot/fix-build-issues-and-broken-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

Bug Fix

The build/test pipeline could launch test apphosts against machine-installed runtimes instead of the repo-bootstrapped .dotnet, causing runtime mismatch failures and cascading broken tests. This change aligns Unix bootstrap behavior with expected runtime resolution during build-driven test execution.

  • What was the bug?

    • eng/common/tools.sh prepended the repo-local dotnet to PATH, but did not export DOTNET_ROOT.
    • Test apphosts executed during build/test/integration flows could resolve runtime from system locations (for example /usr/share/dotnet) rather than the repo toolset.
  • How did you fix it?

    • Export DOTNET_ROOT from the resolved bootstrap root ($dotnet_root) during Unix toolset initialization.
    • Publish the same value via pipeline variable emission to keep child process/environment behavior consistent.
# eng/common/tools.sh
Write-PipelinePrependPath -path "$dotnet_root"
export DOTNET_ROOT="$dotnet_root"

Write-PipelineSetVariable -name "DOTNET_ROOT" -value "$dotnet_root"
  • Scope of change

    • Single-file, bootstrap-only update in eng/common/tools.sh.
    • No product/runtime logic changes; only environment wiring for build/test process execution.
Original prompt

Fix build issues and broken tests

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md

Created from VS Code.

Copilot AI self-assigned this May 13, 2026
Copilot AI review requested due to automatic review settings May 13, 2026 18:08
Copilot AI review requested due to automatic review settings May 13, 2026 18:08
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 13, 2026 18:35
Copilot AI changed the title [WIP] Fix build issues and broken tests Fix Unix build bootstrap runtime resolution for test apphosts May 13, 2026
Copilot AI requested a review from Evangelink May 13, 2026 18:38
@Evangelink Evangelink marked this pull request as ready for review May 14, 2026 07:43
Copilot AI review requested due to automatic review settings May 14, 2026 07:43
@Evangelink Evangelink merged commit 2b326dd into main May 14, 2026
17 of 26 checks passed
@Evangelink Evangelink deleted the copilot/fix-build-issues-and-broken-tests branch May 14, 2026 07:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 fixes Unix build/test runtime resolution by ensuring apphosts and child processes consistently use the repo-bootstrapped .dotnet rather than a machine-installed runtime.

Changes:

  • Export DOTNET_ROOT to the resolved $dotnet_root during Unix toolset initialization.
  • Emit DOTNET_ROOT as a pipeline variable to keep CI child process environments aligned with the bootstrap SDK.
Show a summary per file
File Description
eng/common/tools.sh Exports and publishes DOTNET_ROOT so runtime/apphost resolution uses the bootstrapped SDK consistently.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

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.

3 participants