What am I missing here? I have a WPF project in .NET FX 4.8, I have created a partial class that inherits from ObservableObject, I've decorated all the private fields with the ObservalbeProperty attribute, and then... nothing. Even if I build this by itself, with no other files present beside what the project template gives me, the class does not create the public properties, nor does it have the expected "partial void On____" methods available. I've installed CommunityToolkit.Mvvm version 8.2, and frankly I am stumped.
Yes, that is odd. I've only used the Community Toolkit with .NET (not .NET Framework) but I don't think it should make a difference.
Did you install the package using NuGet? I really can't think of anything else other than perhaps CommunityToolkit.Mvvm is not properly installed into the project. Maybe attempt to install some different/older versions of the package instead.
Sorry I can't be of much more help. If you are starting a brand new project and don't need to use legacy .NET Framework, I would suggest to try creating a WPF project using .NET 6.0 or newer.
I'd love to upgrade but this is a project for a military client. So we're stuck.
After digging through the build output, turns out everything else works except code generation, and it's due to not having Roslyn installed. I was able to make it work by manually adding the properties. Not ideal, but functional nonetheless.
What am I missing here? I have a WPF project in .NET FX 4.8, I have created a partial class that inherits from ObservableObject, I've decorated all the private fields with the ObservalbeProperty attribute, and then... nothing. Even if I build this by itself, with no other files present beside what the project template gives me, the class does not create the public properties, nor does it have the expected "partial void On____" methods available. I've installed CommunityToolkit.Mvvm version 8.2, and frankly I am stumped.
Yes, that is odd. I've only used the Community Toolkit with .NET (not .NET Framework) but I don't think it should make a difference.
Did you install the package using NuGet? I really can't think of anything else other than perhaps CommunityToolkit.Mvvm is not properly installed into the project. Maybe attempt to install some different/older versions of the package instead.
Sorry I can't be of much more help. If you are starting a brand new project and don't need to use legacy .NET Framework, I would suggest to try creating a WPF project using .NET 6.0 or newer.
I'd love to upgrade but this is a project for a military client. So we're stuck.
After digging through the build output, turns out everything else works except code generation, and it's due to not having Roslyn installed. I was able to make it work by manually adding the properties. Not ideal, but functional nonetheless.