Repository navigation
Set a valid temporary directory for .NET on CI - #13136
Merged
jonathanpeppers merged 3 commits intoOct 14, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
simonrozsival
marked this pull request as ready for review
October 14, 2026 09:39
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The workaround is technically sound, but final main macOS validation was still running and its cleanup dependency is not tracked.
1 open finding
What changed in this PR
Introduces a macOS CI workaround that bypasses NuGet’s failing first-run migration mutex.
Changes:
- Creates isolated NuGet migration state under the agent temporary directory.
- Applies it to main macOS builds and Android-tools macOS tests.
- Leaves Windows and Linux jobs unchanged.
| File | Description |
|---|---|
initialize-nuget-migrations.yaml |
Creates the marker and exports XDG_DATA_HOME. |
build-macos-steps.yaml |
Initializes NuGet before macOS build steps. |
stage-xamarin-android-tools-tests.yaml |
Applies initialization to macOS tooling tests. |
🧠 Review effort: Balanced
Comment on lines
+125
to
+126
| # Temporary workaround for NuGet's first-run migration mutex failures on | ||
| # shared macOS agents. The migration marker avoids creating NuGet-Migrations. |
Co-authored-by: Copilot App <[email protected]>
jonathanpeppers
approved these changes
Oct 14, 2026
jonathanpeppers
deleted the
simonrozsival-investigate-ci-build-1634232
branch
October 14, 2026 12:57
9 tasks
6 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Set
TMPDIRto$(Agent.TempDirectory)in the shared pipeline variables..NET 10.0.13 / SDK 10.0.402 changed Unix named mutexes to use user-scoped storage. On the shared macOS agents,
TMPDIRis present as an empty string, which causes the runtime to validate an empty path and fail before NuGet can create itsNuGet-Migrationsmutex:Using the Azure agent's existing per-job temporary directory gives the runtime a valid, private location. This is a one-line effective pipeline change; the earlier NuGet-specific marker workaround was removed. No SDK downgrade or source change is involved.
Validation
git diff --check— passedTMPDIR=$(Agent.TempDirectory)— pendingFollow-up
Remove this workaround when the hosted macOS image supplies a valid
TMPDIRor the runtime servicing guidance changes.