-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorst/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen
Milestone
Description
Description
I was getting an error at runtime
Object of type 'System.String' cannot be converted to type 'Microsoft.Maui.Controls.Setter'.
I found that this XAML was in the project.
<Style TargetType="Page"
ApplyToDerivedTypes="True">
<Setter Property="Padding"
Value="0"/>
ckgroundColor"
Value="{AppThemeBinding Light={StaticResource LightBackground}, Dark={StaticResource DarkBackground}}"/>
</Style>Which is obviously incomplete (thanks to a borked refactoring). This should never have been able to build.
I have XAML source gen enabled.
By some accident of fortune, the app would actually run in some cases too after passing the RTE. Other times it would crash. I think it depended on which debugger was being used.
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
10.0.0-rc.1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI, No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
macOS, Windows, Android, iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
StephaneDelcroix and dartasen
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorst/bugSomething isn't workingSomething isn't workingxsgXaml sourceGenXaml sourceGen