CommunityToolkit / CommunityToolkit/dotnet
`[INotifyPropertyChanged]` is not supported on records
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When applied to record (class) types, the `[INotifyPropertyChanged]` attribute has no effect.
### Regression
_No response_
### Steps to reproduce
```cs
[INotifyPropertyChanged]
partial record Record()
{
[ObservableProperty]
private int x;
}
```
### Expected behavior
The `PropertyChanged` event and the `OnPropertyChanged` method are generated.
### Screenshots
_No response_
### IDE and version
VS 2022 Preview
### IDE version
_No response_
### Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [X] CommunityToolkit.Mvvm (aka MVVM Toolkit)
### Nuget package version(s)
8.1.0
### Additional context
_No response_
### Help us help you
Yes, I'd like to be assigned to work on this item
Contributor guide
Assessment
This issue has not been assessed yet.