Skip to content

[release/11.0.1xx-preview6] [msbuild] Always build referenced extension projects by default#25854

Open
rolfbjarne wants to merge 1 commit into
release/11.0.1xx-preview6from
dev/rolf/backport-pr-25805-release/11.0.1xx-preview6-2026-06-29
Open

[release/11.0.1xx-preview6] [msbuild] Always build referenced extension projects by default#25854
rolfbjarne wants to merge 1 commit into
release/11.0.1xx-preview6from
dev/rolf/backport-pr-25805-release/11.0.1xx-preview6-2026-06-29

Conversation

@rolfbjarne

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>
Copilot AI review requested due to automatic review settings June 29, 2026 14:07
@rolfbjarne rolfbjarne requested a review from mauroa as a code owner June 29, 2026 14:07

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 that determines whether referenced iOS extension projects (app extensions and watch apps) should be built as part of the main project build. It changes the default so referenced extension projects are built unless the IDE explicitly opts out, addressing Visual Studio 2026 behavior where extension projects may not be built ahead of the main project (resulting in missing .appex outputs).

Changes:

  • Default _BuildReferencedExtensionProjects to true when it has not already been set (instead of keying off BuildingInsideVisualStudio).
  • Apply the same defaulting behavior for both app extension references and watch app references.
  • Update inline comments to document the new rationale and link to #25461.

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 Defaults referenced app extension builds to on unless _BuildReferencedExtensionProjects is explicitly set.
msbuild/Xamarin.Shared/Xamarin.iOS.Common.targets Applies the same defaulting behavior for referenced watch app projects.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: aaca7178e3a32f384ef84953afed238577b36e1d [PR build]

@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

✅ 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: aaca7178e3a32f384ef84953afed238577b36e1d [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: aaca7178e3a32f384ef84953afed238577b36e1d [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

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

Pipeline on Agent
Hash: aaca7178e3a32f384ef84953afed238577b36e1d [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne removed the request for review from mauroa June 29, 2026 16:08
@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 #aaca717] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 21 tests failed, 207 tests passed.

Failures

❌ linker tests (iOS) [attempt 4]

21 tests failed, 0 tests passed.

Failed tests

  • dont link/iOS - simulator/Debug: LaunchTimedOut
  • dont link/iOS - simulator/Release: LaunchTimedOut
  • dont link/iOS - simulator/Debug (PrepareAssemblies, CoreCLR, Dynamic Registrar): LaunchTimedOut
  • dont link/iOS - simulator/Debug (PrepareAssemblies, CoreCLR, Managed Static Registrar): LaunchTimedOut
  • dont link/iOS - simulator/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • dont link/iOS - simulator/Release (PrepareAssemblies, CoreCLR, Dynamic Registrar): LaunchTimedOut
  • dont link/iOS - simulator/Release (PrepareAssemblies, CoreCLR, Managed Static Registrar): LaunchTimedOut
  • dont link/iOS - simulator/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • link sdk/iOS - simulator/Debug: LaunchTimedOut
  • link sdk/iOS - simulator/Release: LaunchTimedOut
  • link sdk/iOS - simulator/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • link sdk/iOS - simulator/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • link all/iOS - simulator/Debug: LaunchTimedOut
  • link all/iOS - simulator/Release: LaunchTimedOut
  • link all/iOS - simulator/Debug (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • link all/iOS - simulator/Debug (don't bundle original resources): LaunchTimedOut
  • link all/iOS - simulator/Release (PrepareAssemblies, CoreCLR, Trimmable Static Registrar): LaunchTimedOut
  • trimmode copy/iOS - simulator/Debug: LaunchTimedOut
  • trimmode copy/iOS - simulator/Release: LaunchTimedOut
  • trimmode link/iOS - simulator/Debug: LaunchTimedOut
  • trimmode link/iOS - simulator/Release: LaunchTimedOut

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 6 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 21 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 24 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 24 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (tvOS): All 21 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. [attempt 2] 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: aaca7178e3a32f384ef84953afed238577b36e1d [PR build]

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