Skip to content

[dotnet] Set a default PublishRuntimeIdentifier again. Fixes #24547#26013

Draft
rolfbjarne wants to merge 1 commit into
net11.0from
dev/rolf/issue-24547-figure-out-a-solution-for-setting-publis-39075a
Draft

[dotnet] Set a default PublishRuntimeIdentifier again. Fixes #24547#26013
rolfbjarne wants to merge 1 commit into
net11.0from
dev/rolf/issue-24547-figure-out-a-solution-for-setting-publis-39075a

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Now that dotnet/sdk#54291 has merged and is available in our bundled SDK, we can set a default PublishRuntimeIdentifier again.

Background

We previously had to stop setting PublishRuntimeIdentifier because the .NET SDK appends it to RuntimeIdentifiers. We use RuntimeIdentifiers to mean "build for all these RIDs" (not just "restore for these RIDs"), so the appended publish RID left both RuntimeIdentifier and RuntimeIdentifiers set at the same time, which our build rejects with a validation error.

Change

Validated with a clean build; the new test passes for iOS and tvOS.

Fixes #24547

🤖 Pull request created by Copilot

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>
@rolfbjarne rolfbjarne changed the base branch from main to net11.0 July 9, 2026 14:13
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: ab422978ac97f825219669dd42df8ece9ca1ae79 [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: ab422978ac97f825219669dd42df8ece9ca1ae79 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: ab422978ac97f825219669dd42df8ece9ca1ae79 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: ab422978ac97f825219669dd42df8ece9ca1ae79 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [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

  • monotouch-test/iOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/iOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure
  • monotouch-test/iOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (tvOS) [attempt 2]

3 tests failed, 20 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Release (NativeAOT): BuildFailure
  • monotouch-test/tvOS - simulator/Release (trimmable static registrar, NativeAOT): BuildFailure
  • monotouch-test/tvOS - simulator/Release (NativeAOT, .NET 11 defaults): BuildFailure

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
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. [attempt 2] 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 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: ab422978ac97f825219669dd42df8ece9ca1ae79 [PR build]

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Figure out a solution for setting PublishRuntimeIdentifier

2 participants