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 }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
If you put the ObservablePropertyAttribute on a member var named value it successfully generates a source code for a property that does reference the member variable named value in the generated code as intended. Instead the member var named value gets shadowed by the property setter key word value and the value from the setter gets compared with its self and the member var does not get updated.
Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:
Steps to Reproduce
Can this be reproduced in the Sample App? (Either in a sample as-is or with new XAML pasted in the editor.) If so, please provide custom XAML or steps to reproduce. If not, let us know why it can't be reproduced (e.g. more complex setup, environment, dependencies, etc...)
Steps to reproduce the behavior:
Created a project where you can use the source generators (netstandard)
The member var value and any other keywords in the context of the generated code that could be names of vars are distinguished from keywords in the contexts of the the generated code, or something warns or errors out before such code can be compiled and/or ran, so that users of the generators are not caught off guard with a sneaky error.
Describe the bug
If you put the
ObservablePropertyAttributeon a member var namedvalueit successfully generates a source code for a property that does reference the member variable namedvaluein the generated code as intended. Instead the member var namedvaluegets shadowed by the property setter key wordvalueand the value from the setter gets compared with its self and the member var does not get updated.Steps to Reproduce
Steps to reproduce the behavior:
Expected behavior
The member var
valueand any other keywords in the context of the generated code that could be names of vars are distinguished from keywords in the contexts of the the generated code, or something warns or errors out before such code can be compiled and/or ran, so that users of the generators are not caught off guard with a sneaky error.Screenshots
Environment
NuGet Package(s):
Package Version(s):
Windows 10 Build Number:
App min and target version:
Device form factor:
Visual Studio version:
Additional context