CommunityToolkit / dotnet

.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
https://docs.microsoft.com/dotnet/communitytoolkit/?WT.mc_id=dotnet-0000-bramin
Other
2.8k stars 275 forks source link

CommunityToolkit.Mvvm cannot work with aot #892

Open LanHuangJG opened 1 week ago

LanHuangJG commented 1 week ago

Describe the bug

i use winui3 and CommunityToolkit.Mvvm but when i x:bind a relaycommand to a command of button,then the application cannot start in the debug mode,for the detail code,please see my code

Regression

No response

Steps to reproduce

1.new a winui3 project 
2.update Microsoft.WindowsAppSDK to latest
3.new a viewmodel and add a relaycommand to it
4 bind it to a button
5,start your application
6,you will find you cannot start it

Expected behavior

i can start my application without error successly

Screenshots

86d8207a74c9556e5fc71d55bd5e447b 1bd0c2d169ccf92bdfe66a208a58c78c 826c497cda55641771303a8c9a1d499a 5775759d09ba18371397a229247bb296 342c59e03b5bc7d8533ee151bbe30ead 8b22e75ff222b6416c19eb5aac10d79d

IDE and version

VS 2022 Preview

IDE version

Microsoft Visual Studio Enterprise 2022 (64 位) - Preview 版本 17.11.0 Preview 2.1

Nuget packages

Nuget package version(s)

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

LanHuangJG commented 1 week ago

thank you very much

LanHuangJG commented 1 week ago

more info image image

LanHuangJG commented 1 week ago

image

LanHuangJG commented 1 week ago

when i use mainwindow.appwindow.show() to show my mainwindow it will be image image

LanHuangJG commented 1 week ago

this is my csproj image with my a lot test,i think it myabe command error