Skip to content

App Extension (.appex) builds correctly but is never copied into PlugIns/ during publish (net10.0-ios, IsAppExtension ProjectReference) #26453

Description

@conklinpr

Environment

  • .NET SDK: 10.0.400
  • iOS workload: 26.5.10315/10.0.100
  • Xcode: 26 (native macOS build, not Pair-to-Mac)
  • Target: net10.0-ios, ios-arm64
  • Container app: .NET MAUI (net10.0-ios)
  • Extension type: Share Extension (NSExtensionPointIdentifier = com.apple.share-services)

Summary
A from a .NET MAUI iOS app to a net10.0-ios app-extension project compiles the extension into a real, valid .appex bundle — confirmed by extracting and inspecting it directly. But the built .appex is never copied into .app/PlugIns/ during dotnet build/dotnet publish, so the extension never appears in iOS's share sheet, and no error or warning is raised — the container app just builds and installs successfully without its extension.

Repro steps

  1. Create a .NET MAUI app targeting net10.0-ios.
  2. Add a second project targeting net10.0-ios with true (Share Extension NSExtension in Info.plist, NSExtensionPrincipalClass pointing at a UIViewController subclass).
  3. Reference it from the container app: <ProjectReference Include="..\Extension\Extension.csproj" IsAppExtension="true" />.
  4. dotnet build/dotnet publish -f net10.0-ios -c Release (or Debug) on macOS, natively (not via Pair-to-Mac from Windows — see "Ruled out" below).
  5. Inspect the built .app: find <ContainerApp>.app/PlugIns — empty or missing, despite the extension project having built successfully.

What was ruled out (each independently tested, not assumed)

  • Pair-to-Mac as the cause: initially suspected, and a related-but-different bug was found and fixed for it (_BuildReferencedExtensionProjects defaulting to false on Windows-hosted builds, fixed upstream in dotnet/macios#25805, confirmed present in this SDK version). But the PlugIns-copy issue reproduces identically on a fully native macOS build — installed the SDK + workloads directly on the Mac, built with dotnet build/dotnet publish locally, no Windows/Pair-to-Mac involved at all. Same result: clean build, .appex compiles, PlugIns/ stays empty.
  • RID mismatch: the extension project's was previously pinned to simulator RIDs only from an earlier, unrelated fix — removed so it inherits the container's RID. No change in behavior.
  • Build vs publish, Debug vs Release: tested all four combinations. No change.
  • Stale incremental state: full clean (rm -rf bin obj on both projects) before each attempt. No change.
  • Windows-style path separators in the ProjectReference Include: not the cause — same result with forward slashes.
  • -p:IsMacEnabled=true: found this property in the SDK's own Xamarin.Shared.Sdk.targets as something that partially gates the PlugIns pipeline; forcing it explicitly made no difference.

What the SDK's own source suggests
Reading Xamarin.Shared.Sdk.targets directly in the installed SDK pack (Microsoft.iOS.Sdk.net10.0_26.5/26.5.10315/targets/) shows the PlugIns-publishing logic has two separate code paths — an uncompressed path (_PlugIns, _DirectoriesToPublish) and a compressed/zip-based fallback (_CompressedPlugIns, _DecompressPlugIns, _CollectDecompressedPlugIns) — with a comment in the targets file itself acknowledging this area has known incomplete handling. This reads as genuine, still-open fragility in the SDK's own extension-publishing pipeline rather than a project misconfiguration on our end, but we haven't yet traced exactly which target is failing to add the extension's output to ResolvedFileToPublish (or equivalent) — happy to help narrow this further if a maintainer can point at where that item should be getting added.

Impact
Blocks App Extensions entirely for .NET MAUI iOS apps referencing a sibling extension project the standard way — the extension silently never ships, with no build error to signal `why.```

Metadata

Metadata

Assignees

No one assigned

    Labels

    need-infoWaiting for more information before the bug can be investigated

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions