-
Notifications
You must be signed in to change notification settings - Fork 304
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
Source Generator for [ObservableProperty] doesn't work anymore since upgrading to visual studio 17.11.2. #940
Comments
Is your code actually building correctly? Or does it eg. fail to build if you try referencing the generated property? |
It builds correctly. But the editor is behaving weird (keyboard not functioning correctly, only inside of Visual Studio). |
Yeah this sounds like an issue in the IDE. Try reporting it either in the Roslyn repo or with VS Feedback, and link this one. |
If you do raise an issue elsewhere please post back here that we can vote it up. I have also seen the IDE go nuts about the source generated files, but decided to just ignore it for the time being. |
I just raised the issue using Visual Studio feedback: |
I too had been noticing that source generators didn't seem to be updating nicely as they have in the past and I was needing to rebuild on 17.11.3, I noticed this response there in the issue from Joris:
Seems like a big behavior change for those that rely on these features. I guess it's for performance reasons. Would be nice though if they could separate the options for the old source generators vs. the incremental ones or something too. |
I have no idea if the issues I had were related to this option setting, and I don't think I was using a preview version of Visual Studio either. |
Thanks !! this made the source generation work as expected. EDIT: nevermind, worked for like a minute or so ... now i have to build the project again for the source generator to run |
I'm having the same issue with Visual Studio 17.12.0 Preview 2.1, I think this issue is related to the ServiceHub.RoslynCodeAnalysisServiceS.exe skyrocketing in CPU and RAM usage. When this process "goes crazy", Visual Studio becomes unresponsive and stuff like F12 or "the squiggle" stops working for minutes. |
Describe the bug
I'm using the CommunityToolkit.Mvvm version 8.2.2.
Since I updated Visual Studio 2022 to the latest version 17.11.2, I keep having problems when adding new properties using [ObservableProperty]. The source generator doesn't work automatically, and some keyboard keys (like backspace or delete) don't work anymore. I have to close and restart Visual Studio to be able to continue my work.
I don't know if this is a Visual Studio bug or a toolkit bug.
If this cannot be fixed quickly, I would like to know what the most recent version of Visual Studio where this still works.
Regression
No response
Steps to reproduce
Expected behavior
The sourcegenerator should make the required code for [ObservableProperty] properties on the background without messing up the editor experience.
Screenshots
IDE and version
VS 2022
IDE version
Version 17.11.2
Nuget packages
Nuget package version(s)
8.2.2
Additional context
No response
Help us help you
No, just wanted to report this
The text was updated successfully, but these errors were encountered: