-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visual Studio 2022 v17.12 breaks binding to [ObservableProperty] #76470
Comments
What do you mean by "breaks binding"? |
The binding will not update as a result of a PropertyChanged event notification. The issue has been reproduced by CommunityToolkit (see linked issue above), but closed as it is not deemed a problem in CommunityToolkit, but probably something with code generation, as the UI will update if the program is run in older Visual Studio 2022, but not in the latest version. |
Again, I don't know what "breaks binding" means. |
I don't know what this means. What event notification are you referring to? What is a "binding" here?
What code generation?
What code was generated in older versions of visual studio, and what code is now generated in the latest version? |
OK, I'll try to explain in a different way:
Sample application found here: Project PropertyBindingTest.sln in repo https://github.com/bjorn-malmo/bug-free-happiness/ Now, compile the application using Visual Studio 2022 v17.10 Run the application, update the value of the MyValue property and watch the UI display the new value in the text property. In this situation, I consider the "Binding" to be working! Update Visual Studio 2022 to v17.12 Run the same application again, update the value of the MyValue property, and watch the UI not responding to the update. The PropertyChanged event is raised however. In this situation, I consider the "Binding" to be broken! I don't know what is broken, but it doesn't work. No update. No change. Screenshot from application run in older version: Screenshot from application run in new version: Note the text block on top clearly saying Initial value in the bottom most image! |
Why do you think this is Roslyn? We are the c# to IL compiler. What is different between the two compiled programs that is causing the issue here? |
This appears to be some different language, unrelated to c#/vb. Perhaps an issue with that language, or whatever ui toolkit you are using? |
This is WinUI xaml compiler and belongs to https://github.com/microsoft/microsoft-ui-xaml |
Closing as this is external. I can't move issues from dotnet to Microsoft, so you'll have to create a new issue there |
Version Used:
Building the application using Visual Studio 2022 v17.12.x breaks Binding to [ObservableProperty]
Building the application using Visual Studio 2022 v17.10.6 works perfectly
Please see original issue:
CommunityToolkit/dotnet#1011
Steps to Reproduce:
A minimal repro, with source-code provided, is ideal. Most compiler/language issues can be distilled into a snippet that can be pasted into sharplab.
Diagnostic Id:
If this is a report about a bug in an analyzer, please include the diagnostic ID and message if possible (e.g.
"IDE0030: Use coalesce expression"
).Expected Behavior:
Binding updating value in UI
Actual Behavior:
Binding not updating UI value for property
The text was updated successfully, but these errors were encountered: