CommunityToolkit / CommunityToolkit/dotnet
Adding property using [ObservableProperty] breaks hot reload
- Dominant language
- C#
- Stars
- 3.8k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
Run application
Add viewmodel class and save changes (triggering hot reload) eg
```csharp
internal partial class MainViewModel : ObservableObject
{
}
```
Add properties and save changes (attempting to trigger hot reload) eg
```csharp
[ObservableProperty]
private int _count = 0;
[ObservableProperty]
private int _step = 1;
```
This raises a hot reload error

### Regression
_No response_
### Steps to reproduce
```text
see description
```
### Expected behavior
Hot reload should be successful
### Screenshots
_No response_
### IDE and version
VS 2022
### IDE version
_No response_
### Nuget packages
- [ ] CommunityToolkit.Common
- [ ] CommunityToolkit.Diagnostics
- [ ] CommunityToolkit.HighPerformance
- [ ] CommunityToolkit.Mvvm (aka MVVM Toolkit)
### Nuget package version(s)
8.2.2
### Additional context
_No response_
### Help us help you
No, just wanted to report this
Contributor guide
Assessment
This issue has not been assessed yet.