Repository navigation
Description
Current behavior 🐛
The Mac Catalyst removal in 7.0 (#23772) dropped MacCatalystProjectFolder / MacOSProjectFolder from the platform ignore list in Uno.Common.targets. A project that still has a Platforms/MacCatalyst/ folder (templates created before 7.0 include one) now gets those files compiled into every head except net*-desktop, so unrelated heads fail with errors such as:
Platforms/MacCatalyst/Main.maccatalyst.cs(1,7): error CS0246: The type or namespace name 'UIKit' could not be found
[TargetFramework=net10.0-browserwasm]
I confirmed on the Uno.Sdk evaluation (-getItem:Compile, no build needed) that Platforms/MacCatalyst/Main.maccatalyst.cs is in Compile for net10.0-browserwasm and net10.0-android, while Platforms/Android/Main.cs is correctly removed from net10.0-browserwasm. net10.0-desktop is not affected because Uno.SingleProject.Desktop.targets removes every Platforms/* folder except Desktop.
The 7.0 migration guide (doc/articles/migrating-to-uno-7.md, "Mac Catalyst is removed") says "the Platforms/MacCatalyst/ folder is no longer picked up". In practice the opposite happens: it is picked up by the default glob and nothing excludes it. The only hint to delete the folder is the last line of the migration checklist, and the build error does not point there.
Expected behavior 🎯
One of these (in order of preference):
- Keep ignoring
Platforms/MacCatalyst/**(andPlatforms/macOS/**) for all heads, as 6.x did, so an old folder is inert. - Emit a clear diagnostic when
Platforms/MacCatalyst/exists (or anet*-maccatalystTFM is listed) saying Mac Catalyst is no longer supported and the folder should be removed or moved toPlatforms/Desktop/.
At minimum the migration guide wording should be corrected: the folder is not ignored any more, so it must be deleted or moved.
How to reproduce it (as minimally and precisely as possible) 🔬
- Create a folder with
global.json:{ "msbuild-sdks": { "Uno.Sdk": "7.0.0-dev.32" } } - Add
MacCatProbe.csproj:<Project Sdk="Uno.Sdk"> <PropertyGroup> <TargetFrameworks>net10.0-desktop;net10.0-browserwasm;net10.0-android</TargetFrameworks> <OutputType>Exe</OutputType> <UnoSingleProject>true</UnoSingleProject> <UnoFeatures></UnoFeatures> </PropertyGroup> </Project>
- Add
Platforms/MacCatalyst/Main.maccatalyst.cs:andusing UIKit; class MainMac { }
Platforms/Android/Main.cscontainingclass AndroidOnly { }as a control. - Run:
dotnet msbuild -p:TargetFramework=net10.0-browserwasm -getItem:Compile dotnet msbuild -p:TargetFramework=net10.0-android -getItem:Compile dotnet msbuild -p:TargetFramework=net10.0-desktop -getItem:Compile - Result:
Platforms\MacCatalyst\Main.maccatalyst.csis listed forbrowserwasmandandroid(and would be forios,tvos,windows).Platforms\Android\Main.csis not listed forbrowserwasm. Buildingnet10.0-browserwasmfails with CS0246 onUIKit. - Control: the same project on
Uno.Sdk6.7.30 (withnet9.0-*TFMs) does not list the MacCatalyst file forbrowserwasmorandroid.
Workaround 🛠️
Delete (or move to Platforms/Desktop/) the Platforms/MacCatalyst/ folder, or exclude it explicitly:
<ItemGroup>
<Compile Remove="Platforms\MacCatalyst\**" />
<None Include="Platforms\MacCatalyst\**" />
</ItemGroup>Renderer 🎨
- Skia
Affected platforms 📱💻🖥️
WebAssembly, Android, iOS, Windows App SDK, Build tasks
Uno.Sdk version (and other relevant versions) 📦
Uno.Sdk 7.0.0-dev.32 (verified), and the 7.0.0-dev.1166 Uno.Sdk.Private build has the same ignore list as current master (47267e7). .NET SDK 10.0.4xx.
IDE version 🧑💻
N/A (command line)
Anything else we need to know? 💬
Root cause: the list of ignored platform folders in src/Uno.Sdk/targets/Uno.Common.targets now covers Android, iOS, tvOS, Desktop, Wasm and Windows only. Uno.Sdk 6.x also had MacCatalystProjectFolder and MacOSProjectFolder entries there. src/Uno.Sdk/targets and Sdk no longer contain any reference to MacCatalyst.
A small fix is to add one generic _IgnorePlatformFiles item for $(PlatformsProjectFolder)MacCatalyst\** and macOS\** (unconditionally, since no head uses them), or a build warning when those folders exist.
Related but distinct: #24500 (the SDK silently accepts a net10.0-maccatalyst TFM). That one is about the TFM being accepted without any diagnostic; this one is about the leftover source folder being compiled into other heads. A single "Mac Catalyst is not supported" diagnostic could cover both.
Activity
fix(sdk): Stop compiling a leftover Platforms/MacCatalyst folder
khaskoul commentedon Nov 9, 2026
Scope: Windows head. App with
-platforms desktop windowsplusPlatforms/MacCatalyst/Main.maccatalyst.cs(using UIKit; class M {}).-getItem:Compilefor net10.0-windows10.0.26100Platforms\MacCatalyst\Main.maccatalyst.csResult: fixed (checked on the Windows head; the browserwasm / android heads from the report were not built).
Verified fixed on Uno.Sdk 7.0.0-dev.179.
Environment: Windows 11 Pro (26200), .NET SDK 10.0.401, Uno.Sdk / Uno.Templates 7.0.0-dev.179 (Uno.WinUI 7.1.0-dev.90).
App created with
-platforms desktop windowsplusPlatforms/MacCatalyst/Main.maccatalyst.cs(using UIKit; class M {}), checked on the WinAppSDK head (net10.0-windows10.0.26100):dotnet msbuild -getItem:Compile