Draft
Conversation
Clear inherited DOTNET_HOST_PATH, DOTNET_ROOT, and DOTNET_INSTALL_DIR when invoking per-repo prepare commands, add .NET SDK diagnostics after UseDotNet, and emit warnings when a repo prepare exits non-zero. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Closed
jjonescz
approved these changes
Mar 12, 2026
Member
jjonescz
left a comment
There was a problem hiding this comment.
I've checked the internal build https://dev.azure.com/dnceng/internal/_build/results?buildId=2925190&view=logs&j=ab7887b3-04d8-59d0-1c42-6439487f6cb4&t=0cb190f4-4ced-50ff-d593-b2ad0a3d29dc and don't see the msbuild .net sdk errors in the prepare step, so LGTM
radical
added a commit
to radical/source-indexer
that referenced
this pull request
Mar 12, 2026
Bump source-indexer's global.json from 10.0.100 to 10.0.101 as a contained mitigation for the current msbuild runtime mismatch while the broader prepare environment isolation fix proceeds separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> EOF && git push -u rf ankj/global-json-10-0-101 && gh pr create --repo dotnet/source-indexer --base main --head radical:ankj/global-json-10-0-101 --draft --title "Temporarily bump SDK to 10.0.101" --body-file - <<'EOF' ## Summary - bump `global.json` from `10.0.100` to `10.0.101` ## Why This is a contained temporary mitigation for the current `msbuild` mismatch, where repo-local SDK bits can end up using runtime state from the outer pipeline-installed dotnet. Installing `10.0.101` in the outer pipeline should make the hosted toolcache contain a runtime new enough to avoid the current `10.0.1` app-launch failure. This is intentionally separate from the broader fix in dotnet#249, which isolates inherited `.NET` environment variables during per-repo prepare. ## Validation - `dotnet --version`
Merged
radical
added a commit
that referenced
this pull request
Mar 13, 2026
* Temporarily bump SDK to 10.0.101 Bump source-indexer's global.json from 10.0.100 to 10.0.101 as a contained mitigation for the current msbuild runtime mismatch while the broader prepare environment isolation fix proceeds separately. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> EOF && git push -u rf ankj/global-json-10-0-101 && gh pr create --repo dotnet/source-indexer --base main --head radical:ankj/global-json-10-0-101 --draft --title "Temporarily bump SDK to 10.0.101" --body-file - <<'EOF' ## Summary - bump `global.json` from `10.0.100` to `10.0.101` ## Why This is a contained temporary mitigation for the current `msbuild` mismatch, where repo-local SDK bits can end up using runtime state from the outer pipeline-installed dotnet. Installing `10.0.101` in the outer pipeline should make the hosted toolcache contain a runtime new enough to avoid the current `10.0.1` app-launch failure. This is intentionally separate from the broader fix in #249, which isolates inherited `.NET` environment variables during per-repo prepare. ## Validation - `dotnet --version` * Surface repo prepare failures as warnings Backport the explicit warning emission for per-repo prepare failures to the temporary global.json mitigation branch so failed repo prepares are visible without pulling in the full environment-isolation change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
UseDotNet@2to show the installed SDK and active dotnet pathsWhy
Prepareruns many repos, and some of them bootstrap their own repo-local.dotnet. The failingmsbuildcase was mixing SDK bits from the repo-local bootstrap with runtime resolution from the outer pipeline-installed toolcache. This change fixes that at the prepare invocation boundary instead of changing source-indexer's ownglobal.json.Validation
dotnet build src/source-indexer.sln -v minimaldotnet msbuild build.proj /t:Prepare /p:WhatIf=true -nologo(hits the expected Windows-only guard on macOS)