-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Type of issue
Code doesn't work
Description
So here we go again...
public class ViewModelObject : ObservableObject
{
[ObservableProperty]
public int Count = 1;
}
This doesn't work because it throws MVVMTK0045 and MVVMTK0014
public partial class ViewModelObject : ObservableObject
{
[ObservableProperty]
public int Count = 1;
}
This doesn't work because it throws MVVMTK0045 and MVVMTK0014
public partial class ViewModelObject : ObservableObject
{
[ObservableProperty]
public partial int Count = 1;
}
This doesn't work because it throws CS0267 - as code to fix MVVMTK0045 and MVVMTK0014 recommends adding partial to a property.
What works?
Any guesses...
Page URL
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/generators/errors/mvvmtk0045
Content source URL
Document Version Independent Id
e5623fb0-a53a-1164-b4d2-6f81bb38d041
Platform Id
cb1c87d2-610f-30a6-37c6-ecd053cb3b68
Article author
Metadata
- ID: e5623fb0-a53a-1164-b4d2-6f81bb38d041
- PlatformId: cb1c87d2-610f-30a6-37c6-ecd053cb3b68
- Service: dotnet-communitytoolkit
- Sub-service: mvvm-toolkit