So, I am trying to experiment with .NET Maui and wanted to use the community toolkit for MVVM. Here is the extremely simple class:
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MauiApp2
{
public partial class Class1 : ObservableObject
{
[ObservableProperty]
public int test;
[ObservableProperty]
[NotifyPropertyChangedFor(nameof(Test))]
public int test2;
public void Testing()
{
Test = 1;
}
}
}
And here is what the source generator is showing, the MVVM is not throwing any errors in the code but see here.
Any ideas what's causing this?
I have searched every way I can think of and I haven't seen anything about these issues.