[dotnet] Set a default PublishRuntimeIdentifier again. Fixes #24547#26013
[dotnet] Set a default PublishRuntimeIdentifier again. Fixes #24547#26013rolfbjarne wants to merge 1 commit into
Conversation
We had to stop setting `PublishRuntimeIdentifier` because the SDK appends it to `RuntimeIdentifiers`, which confuses our build (we use `RuntimeIdentifiers` to mean "build for all these RIDs", not just "restore all these RIDs"), and we ended up with both `RuntimeIdentifier` and `RuntimeIdentifiers` set. The SDK now has an escape hatch for this behavior (`AppendPublishRuntimeIdentifierToRuntimeIdentifiers=false`), so re-enable setting `PublishRuntimeIdentifier` for iOS/tvOS and opt out of appending it to `RuntimeIdentifiers`. Also add a regression test. Ref: dotnet/sdk#54291 Fixes #24547 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #ab42297] Build passed (Detect API changes) ✅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 #ab42297] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #ab42297] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build #ab42297] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 6 tests failed, 250 tests passed. Failures❌ monotouch tests (iOS) [attempt 2]3 tests failed, 20 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (tvOS) [attempt 2]3 tests failed, 20 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Now that dotnet/sdk#54291 has merged and is available in our bundled SDK, we can set a default
PublishRuntimeIdentifieragain.Background
We previously had to stop setting
PublishRuntimeIdentifierbecause the .NET SDK appends it toRuntimeIdentifiers. We useRuntimeIdentifiersto mean "build for all these RIDs" (not just "restore for these RIDs"), so the appended publish RID left bothRuntimeIdentifierandRuntimeIdentifiersset at the same time, which our build rejects with a validation error.Change
PublishRuntimeIdentifier(ios-arm64/tvos-arm64).RuntimeIdentifiersvia the new escape hatchAppendPublishRuntimeIdentifierToRuntimeIdentifiers=false(added in Add escape hatch for PublishRuntimeIdentifier being appended to RuntimeIdentifiers by default sdk#54291).PublishRuntimeIdentifieris set but is not appended toRuntimeIdentifiers.Validated with a clean build; the new test passes for iOS and tvOS.
Fixes #24547
🤖 Pull request created by Copilot