Summary
ViewModels/TodoListViewModel.cs uses the older [ObservableProperty] private <type> <field>; pattern from CommunityToolkit.Mvvm, which produces this warning on the net10.0-windows10.0.26100 head:
ViewModels/TodoListViewModel.cs(21,18): warning MVVMTK0045: The field TodoApp.Uno.ViewModels.TodoListViewModel.isRefreshing using [ObservableProperty] will generate code that is not AOT compatible in WinRT scenarios (such as UWP XAML and WinUI 3 apps), and a partial property should be used instead ...
ViewModels/TodoListViewModel.cs(27,20): warning MVVMTK0045: ... TodoListViewModel.title ...
ViewModels/TodoListViewModel.cs(24,63): warning MVVMTK0045: ... TodoListViewModel.items ...
CI run: https://github.com/CommunityToolkit/Datasync/actions/runs/29093946725 (todoapp-uno / windows job)
This is pre-existing sample code, unrelated to #524/#525/#526 (PR #533) - it's just newly visible now that CI builds the windows head as part of the todoapp-uno job for the first time (previously blocked by #525's build failure on the other heads before the whole job could be wired in).
Root cause
CommunityToolkit.Mvvm's source generator warns that the field-based [ObservableProperty] private bool isRefreshing; pattern isn't safe for AOT-published, WinRT-marshalled scenarios (WinUI 3 / UWP), because CsWinRT's generators need a partial property (not a private field) to produce correct WinRT marshalling code. Today this is diagnostic-only: the sample is built (not AOT-published) in CI, so there's no functional impact yet, but it's the officially recommended modern MVVM Toolkit pattern regardless of AOT.
Affected fields in TodoListViewModel.cs: isRefreshing, items, title.
Suggested fix
Convert each field to the modern partial-property pattern, e.g.:
[ObservableProperty]
private bool isRefreshing;
becomes
[ObservableProperty]
public partial bool IsRefreshing { get; set; }
...and update any internal references from the lowercase backing-field name to the generated PascalCase property name (most usages should already be going through the generated property rather than the field directly). Apply to isRefreshing, items, and title in TodoListViewModel.cs.
Summary
ViewModels/TodoListViewModel.csuses the older[ObservableProperty] private <type> <field>;pattern fromCommunityToolkit.Mvvm, which produces this warning on thenet10.0-windows10.0.26100head:CI run: https://github.com/CommunityToolkit/Datasync/actions/runs/29093946725 (
todoapp-uno / windowsjob)This is pre-existing sample code, unrelated to #524/#525/#526 (PR #533) - it's just newly visible now that CI builds the
windowshead as part of thetodoapp-unojob for the first time (previously blocked by #525's build failure on the other heads before the whole job could be wired in).Root cause
CommunityToolkit.Mvvm's source generator warns that the field-based[ObservableProperty] private bool isRefreshing;pattern isn't safe for AOT-published, WinRT-marshalled scenarios (WinUI 3 / UWP), becauseCsWinRT's generators need apartialproperty (not a private field) to produce correct WinRT marshalling code. Today this is diagnostic-only: the sample is built (not AOT-published) in CI, so there's no functional impact yet, but it's the officially recommended modern MVVM Toolkit pattern regardless of AOT.Affected fields in
TodoListViewModel.cs:isRefreshing,items,title.Suggested fix
Convert each field to the modern partial-property pattern, e.g.:
becomes
...and update any internal references from the lowercase backing-field name to the generated PascalCase property name (most usages should already be going through the generated property rather than the field directly). Apply to
isRefreshing,items, andtitleinTodoListViewModel.cs.