Skip to content

Explicitly target iOS and macOS to osx and Windows platforms (only)#3186

Open
matt-goldman wants to merge 5 commits intoCommunityToolkit:mainfrom
matt-goldman:enable-linux-dev
Open

Explicitly target iOS and macOS to osx and Windows platforms (only)#3186
matt-goldman wants to merge 5 commits intoCommunityToolkit:mainfrom
matt-goldman:enable-linux-dev

Conversation

@matt-goldman
Copy link
Copy Markdown
Contributor

Description of Change

Adds MS Build conditions to explicitly exclude macOS and iOS TFMs when the OS is not macOS or Windows.

No tests included as it would require adding a new workflow with a Linux-targetted runner specifically just for this one test. That's probably not necessary; however could be useful in future as would allow building Android (and Tizen) binaries on a Linux runner. Might be worth considering, but for now I did not want to introduce a workflow just for that.

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: N/A - not related to public docs. I also checked the contributing guide and there was nothing there to update.

Additional information

Just confirming that this is a no-op for any existing users, and just enables development on Linux.

Copilot AI review requested due to automatic review settings April 5, 2026 21:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 repo-wide MSBuild configuration to avoid including Apple TFMs when building on unsupported host OSes (e.g., Linux), enabling developers to build Android (and optionally Tizen) without requiring iOS/macOS workloads.

Changes:

  • Add a conditional PropertyGroup in Directory.Build.targets to override TargetFrameworks on non-macOS/non-Windows hosts when iOS is present.
  • Ensure Exe projects only target Android in that scenario, with optional Tizen inclusion.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

matt-goldman and others added 2 commits April 6, 2026 15:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Does not compile on Linux

3 participants