-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Copy link
Labels
partner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/macosmacOS / Mac CatalystmacOS / Mac Catalysts/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Description
Description
In the HostApp.cs project, SourceGen is enabled. When running Bugzilla39636, it throws a TargetInvocationException on Mac
https://github.com/dotnet/maui/blob/main/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla39636.xaml
"In OnPlatform, the MacCatalyst value is not defined, so it should take the default value of 0. But when SourceGen is enabled, it doesn't seem to recognize the default value and throws an exception. Without SourceGen, it works properly without any exceptions
With SourceGen in HostApp.
Screen.Recording.2025-11-20.at.6.40.42.PM.mov
Without SourceGen in HostApp
Screen.Recording.2025-11-20.at.6.42.11.PM.mov
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
10.0.10
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
No response
Affected platforms
macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
Copilot
Metadata
Metadata
Assignees
Labels
partner/syncfusionIssues / PR's with Syncfusion collaborationIssues / PR's with Syncfusion collaborationplatform/macosmacOS / Mac CatalystmacOS / Mac Catalysts/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen