You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
x:Bind not support the property generated by source generator #14409
area/code-generationCategorizes an issue or PR as relevant to code generationarea/xBind 🪢Categorizes an issue or PR as relevant to x:Binddifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingproject/binding 🪢Categorizes an issue or PR as relevant to the binding engine
Thanks for the report. It seems that the code you're referencing is coming from a Source Generator. This is currently not supported because of #12073, which is ultimately caused by dotnet/roslyn#57239.
If you need this to work, you'll need to place your ViewModel classes in a separate library project from the XAML files.
Thanks for the report. It seems that the code you're referencing is coming from a Source Generator. This is currently not supported because of #12073, which is ultimately caused by dotnet/roslyn#57239.
If you need this to work, you'll need to place your ViewModel classes in a separate library project from the XAML files.
I think so too.but problem is the same code which from mvvmtoolkit source generator works well...
It works with MVVM Toolkit because Uno has a specific workaround for this library. It does not know about the other generators and can't generate code properly.
Best that can be done here is separating out the ViewModels to a separate project, if possible.
That way, the source generator will be run in the context of a project different than the one XAML generator runs in and things will work. I don't think this is currently fixable.
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
area/code-generationCategorizes an issue or PR as relevant to code generationarea/xBind 🪢Categorizes an issue or PR as relevant to x:Binddifficulty/medium 🤔Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUIkind/bugSomething isn't workingproject/binding 🪢Categorizes an issue or PR as relevant to the binding engine
Activity
jeromelaban commentedon Nov 14, 2023
Thanks for the report. It seems that the code you're referencing is coming from a Source Generator. This is currently not supported because of #12073, which is ultimately caused by dotnet/roslyn#57239.
If you need this to work, you'll need to place your ViewModel classes in a separate library project from the XAML files.
SongOfYouth commentedon Nov 15, 2023
I think so too.but problem is the same code which from mvvmtoolkit source generator works well...
jeromelaban commentedon Nov 15, 2023
It works with MVVM Toolkit because Uno has a specific workaround for this library. It does not know about the other generators and can't generate code properly.
Youssef1313 commentedon Jun 12, 2024
Best that can be done here is separating out the ViewModels to a separate project, if possible.
That way, the source generator will be run in the context of a project different than the one XAML generator runs in and things will work. I don't think this is currently fixable.
Youssef1313 commentedon Jun 12, 2024
Another possible workaround is also suggested in #12073 (comment)
dr1rrb commentedon May 20, 2025
An important occurrence of this problem is MVUX:
[Bindable]attribute is not considered by uno's type info generator uno.extensions#2648github-actions commentedon May 1, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.