[ObservableProperty] fields not being detected in Visual Studio 17.14.4
Describe the bug
When using Community Toolkit 8.4.0 with Visual Studio 17.14.4, properties that are generated using the [ObservableProperty] attribute are not detected by Visual Studio's Intellisense. This makes it look like there are errors in the code, but the solution compiles without error and runs correctly.
This issue was only observed after updating to Visual Studio 17.14.4. The Community Toolkit worked well with my previous version of Visual Studio (17.14.2).
Regression
No response
Steps to reproduce
- Using Visual Studio 17.14.4 and Community Toolkit 8.4.0.
- Create a partial class.
- Use the [ObservableProperty] attribute to create a property.
- Attempt to use that property in the class' constructor (or anywhere else).
- The property will not be detected by Visual Studio's Intellisense, but will be used correctly during program execution.
Expected behavior
I would expect that the property generated with the [ObservableProperty] attribute to be noticed by Visual Studio.
Screenshots
IDE and version
VS 2022
IDE version
17.14.4
Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [x] CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)
8.4.0
Additional context
No response
Help us help you
No, just wanted to report this
I have noticed this as well recently, but I am on 17.13.6. I think this may have something to do with MAUI itself (i.e. in the build process), and not this library. I'm pretty sure I noticed this happening before the last time I updated this library.
But this is also something that has always kind of been an issue since the introduction of multiple compilers/analyzers/etc. where they sometimes get out of sync or aren't all caught up and have a (probably unavoidable) "dependency hell" of tasks and all that.
I wanted to let anyone know that after some testing on my end, it seems this was due to a conflict with ReSharper. I was using ReSharper 2024.1, but when I updated to ReSharper 2025.1, the issue went away.