Skip to content

[release/10.0.1xx] [msbuild] Always build referenced extension projects by default#25846

Merged
dalexsoto merged 1 commit into
release/10.0.1xxfrom
dev/rolf/backport-pr-25805-release/10.0.1xx-2026-06-29
Jun 29, 2026
Merged

[release/10.0.1xx] [msbuild] Always build referenced extension projects by default#25846
dalexsoto merged 1 commit into
release/10.0.1xxfrom
dev/rolf/backport-pr-25805-release/10.0.1xx-2026-06-29

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Jun 29, 2026

Copy link
Copy Markdown
Member

Change the condition for _BuildReferencedExtensionProjects from BuildingInsideVisualStudio != true to 'not already set'. This way the property defaults to true (always build extensions), but the IDE can still override it by setting it explicitly.

This fixes VS 2026 builds where the IDE doesn't build the extension project before the main project, leaving the .appex missing.

Fixes #25461

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Backport of #25805.

Change the condition for _BuildReferencedExtensionProjects from
'BuildingInsideVisualStudio != true' to 'not already set'. This way
the property defaults to true (always build extensions), but the IDE
can still override it by setting it explicitly.

This fixes VS 2026 builds where the IDE doesn't build the extension
project before the main project, leaving the .appex missing.

Fixes #25461

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rolfbjarne rolfbjarne requested a review from mauroa as a code owner June 29, 2026 10:51
Copilot AI review requested due to automatic review settings June 29, 2026 10:51

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 updates the MSBuild logic for iOS/macOS app extension (and watch app) project references so referenced extension projects are built by default unless an external caller (such as the IDE) explicitly sets the controlling property. This addresses Visual Studio 2026 scenarios where extension projects are not built before the main app, resulting in missing .appex outputs and build failures (#25461).

Changes:

  • Change the defaulting condition for _BuildReferencedExtensionProjects so it becomes true when not already set (instead of being disabled when BuildingInsideVisualStudio=true).
  • Apply the same defaulting behavior for both app extensions and watch app references to keep behavior consistent across extension-like referenced projects.

Reviewed changes

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

File Description
msbuild/Xamarin.Shared/Xamarin.Shared.targets Default _BuildReferencedExtensionProjects to true when unset for app extension reference resolution.
msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets Default _BuildReferencedExtensionProjects to true when unset for watch app reference resolution.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: 5901fb20a1e725984a345487c4d46c6bd863e8c7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #5901fb2] Build passed (Build packages) ✅

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

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #5901fb2] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 5901fb20a1e725984a345487c4d46c6bd863e8c7 [PR build]

@rolfbjarne rolfbjarne removed the request for review from mauroa June 29, 2026 11:32
@rolfbjarne rolfbjarne enabled auto-merge (squash) June 29, 2026 11:32
@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.

@rolfbjarne rolfbjarne disabled auto-merge June 29, 2026 14:08
@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

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #5901fb2] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 175 tests passed 🎉

Tests counts

✅ 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. [attempt 10] Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 16 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 16 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: 5901fb20a1e725984a345487c4d46c6bd863e8c7 [PR build]

@dalexsoto dalexsoto merged commit e6aeff4 into release/10.0.1xx Jun 29, 2026
49 checks passed
@dalexsoto dalexsoto deleted the dev/rolf/backport-pr-25805-release/10.0.1xx-2026-06-29 branch June 29, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants