Skip to content

CommunityToolkit.Mvvm cannot work with aot #892

@LanHuangJG

Description

@LanHuangJG

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
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An unexpected issue that highlights incorrect behaviormvvm-toolkit 🧰Issues/PRs for the MVVM Toolkit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions