[msbuild/dotnet] Fix remote Release builds when using plural RuntimeIdentifiers. Fixes #24046.#24228
[msbuild/dotnet] Fix remote Release builds when using plural RuntimeIdentifiers. Fixes #24046.#24228rolfbjarne wants to merge 5 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #d611b18] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #d611b18] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build #d611b18] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #d611b18] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #d611b18] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
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
BuildSessionIdandBuildAppNamefrom the outer multi-RID build into the inner RID-specific builds (MSBuildtask 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. |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #f44a28f] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build #f44a28f] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #f44a28f] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [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 macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
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).