Skip to content

[msbuild/dotnet] Fix remote Release builds when using plural RuntimeIdentifiers. Fixes #24046.#24228

Open
rolfbjarne wants to merge 5 commits into
mainfrom
dev/rolf/issue-24046-strip-remote-runtimeidentifiers
Open

[msbuild/dotnet] Fix remote Release builds when using plural RuntimeIdentifiers. Fixes #24046.#24228
rolfbjarne wants to merge 5 commits into
mainfrom
dev/rolf/issue-24046-strip-remote-runtimeidentifiers

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Nov 12, 2025

Copy link
Copy Markdown
Member

The problem is that when using RuntimeIdentifiers (plural), we have an outer build (for the plural version) and an inner build (for the singular version), and the session id is different between them. This means the outer build can't see the outputs from the inner build, because they're not in the same location on the Mac.

The fix is to pass on the session id from the outer to the inner build, so that the inner build uses the same session id as the outer build.

Fixes #24046.
Fixes #25438 (once merged into net11.0).

…dentifiers. Fixes #24046.

WIP: this only contains a tentative test at the moment, the actual fix is hopefully coming at some point.

Fixes #24046.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [CI Build #d611b18] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: d611b183bad34400120a9c21c3ba867a481f6a81 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [CI Build #d611b18] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: d611b183bad34400120a9c21c3ba867a481f6a81 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [CI Build #d611b18] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: d611b183bad34400120a9c21c3ba867a481f6a81 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [CI Build #d611b18] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: d611b183bad34400120a9c21c3ba867a481f6a81 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

💻 [CI Build #d611b18] Tests on macOS arm64 - Mac Tahoe (26) passed 💻

All tests on macOS arm64 - Mac Tahoe (26) passed.

Pipeline on Agent
Hash: d611b183bad34400120a9c21c3ba867a481f6a81 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

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 fixes Windows-to-Mac remote builds when using RuntimeIdentifiers (plural) by ensuring that the inner RID-specific builds reuse the same remote build session metadata as the outer build, so outer targets can reliably find outputs produced by inner builds on the Mac (fixing the missing mtouch-symbols.list/strip failures described in #24046 and related test failures like #25438).

Changes:

  • Pass BuildSessionId and BuildAppName from the outer multi-RID build into the inner RID-specific builds (MSBuild task invocation).
  • Avoid regenerating a new remote build session id/app name when they’re already set (so inner builds don’t diverge).
  • Expand the Windows remote test coverage to include a Release build scenario for the plural-RID build path.

Reviewed changes

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

File Description
tests/dotnet/UnitTests/WindowsTest.cs Extends remote Windows test cases to cover Release configuration for the plural-RID build scenario.
tests/dotnet/UnitTests/ProjectTest.cs Adds configuration support to the plural-RID helper and ensures Configuration is explicitly passed for the build.
msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.Messaging.targets Skips session id/app name generation when already provided, preventing inner builds from creating a different session.
dotnet/targets/Xamarin.Shared.Sdk.targets Propagates BuildSessionId/BuildAppName into inner RID-specific builds so remote outputs land in the same session location.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #f44a28f] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: f44a28fbfb808b64993f86a52195b7e6bdf89049 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #f44a28f] Build passed (Build packages) ✅

Pipeline on Agent
Hash: f44a28fbfb808b64993f86a52195b7e6bdf89049 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: f44a28fbfb808b64993f86a52195b7e6bdf89049 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #f44a28f] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: f44a28fbfb808b64993f86a52195b7e6bdf89049 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #f44a28f] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 0 tests failed, 195 tests passed.

Failures

❌ interdependent-binding-projects tests

🔥 Failed catastrophically on VSTS: test results - interdependent-binding-projects (no summary found).

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: f44a28fbfb808b64993f86a52195b7e6bdf89049 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants