-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Why don't .NET MAUI 9 C# compiled bindings support source-generated properties? #25988
Copy link
Copy link
Closed
Closed
Copy link
Labels
Milestone
Description
Description
Why don't .NET MAUI 9 compiled bindings support source-generated properties?
When I tried to use the MVVM Toolkit feature for a source-generated property from a backing field and bound it to the newly defined SetBinding call, I received this build error message.
If XAML can work with this property binding, why is C# raising an issue? Support for SG-properties is very crucial in the current context.
Error message: The lambda result type cannot be resolved. Make sure that soruce generated fields / properties are not used in the path.
// Defined within the Page constructor
this.SetBinding(Page.TitleProperty, static (MainViewModel vm) => vm.Title);Public API Changes
Ability to resolve the compilation context with the SG-generated source files.
Intended Use-Case
Potential use of source-generated (SG) toolkits, including the officially supported CommunityToolkit.Mvvm package.
Reactions are currently unavailable