dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

CommunityToolkit.Mvvm cannot work with aot

Open LanHuangJG opened this issue 1 year ago • 5 comments

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

  • [ ] CommunityToolkit.Common
  • [ ] CommunityToolkit.Diagnostics
  • [ ] CommunityToolkit.HighPerformance
  • [X] CommunityToolkit.Mvvm (aka MVVM Toolkit)

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 avatar Jun 23 '24 09:06 LanHuangJG

thank you very much

LanHuangJG avatar Jun 23 '24 09:06 LanHuangJG

more info image image

LanHuangJG avatar Jun 23 '24 09:06 LanHuangJG

image

LanHuangJG avatar Jun 23 '24 09:06 LanHuangJG

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

LanHuangJG avatar Jun 23 '24 09:06 LanHuangJG

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

LanHuangJG avatar Jun 23 '24 09:06 LanHuangJG