[ObservableProperty] - error CS0103: The name '{Property}' does not exist in the current context #330
Closed
1 of 4 tasks
Labels
external ⤴️
Something related to or caused by an external project
mvvm-toolkit 🧰
Issues/PRs for the MVVM Toolkit
Describe the bug
I receive the build-time error:
CS0103: The name '{Property}' does not exist in the current context upon building when using [ObservableProperty] and trying to set the generated property
Regression
No response
Steps to reproduce
Build, build fails with error:
error CS0103: The name 'Title' does not exist in the current context
Intellisense does not pick up that Title property exists
Roll back to CommunityToolkit.Mvvm 7.1.2
Build, fails with error:
error CS0103: The name 'Title' does not exist in the current context
In 7.1.2, although build still fails, intellisense does pick up that the Title property exists, with generated code as below:
Expected behavior
I expect to be able to use the generated Title property, and for OnPropertyChanged to fire automatically when changing the value
Screenshots
No response
IDE and version
VS 2022
IDE version
17.2.3
Nuget packages
Nuget package version(s)
7.1.2, 8.0.0-preview4
Additional context
No response
Help us help you
No, just wanted to report this
The text was updated successfully, but these errors were encountered: