NotifyGen 2.2.1

dotnet add package NotifyGen --version 2.2.1
                    
NuGet\Install-Package NotifyGen -Version 2.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="NotifyGen" Version="2.2.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NotifyGen" Version="2.2.1" />
                    
Directory.Packages.props
<PackageReference Include="NotifyGen">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add NotifyGen --version 2.2.1
                    
#r "nuget: NotifyGen, 2.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package NotifyGen@2.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=NotifyGen&version=2.2.1
                    
Install as a Cake Addin
#tool nuget:?package=NotifyGen&version=2.2.1
                    
Install as a Cake Tool

NotifyGen Banner

<p align="center"> <img src="https://raw.githubusercontent.com/georgepwall1991/NotifyGen/master/assets/icon.png" alt="NotifyGen Icon" width="128" height="128" /> </p>

NotifyGen

NuGet NuGet Downloads Build Status Coverage .NET License: MIT

Stop writing INotifyPropertyChanged boilerplate. Let the compiler do it.

Zero runtime reflection. No IL weaving. No required base class. Inspectable generated C# for WPF, MAUI, Avalonia, Uno, WinUI, and Blazor ViewModels.

<p align="center"> <img src="https://raw.githubusercontent.com/georgepwall1991/NotifyGen/master/assets/demo.gif" alt="NotifyGen binding demo: FirstName/LastName update FullName via NotifyAlso" width="560" /> </p>

Migrating from [ObservableProperty]?

Keep CommunityToolkit.Mvvm for RelayCommand / messaging. Use NotifyGen for properties — no required ObservableObject, zero runtime package.

Add NotifyGen, click the lightbulb on [ObservableProperty] (NOTIFY023), and Fix All. Unmarked _logger / _disposed fields stay private.

Migration checklist & attribute map · Hybrid UI sample

Quick start

dotnet add package NotifyGen
<PackageReference Include="NotifyGen" Version="2.2.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
using NotifyGen;

[Notify]
public partial class Person
{
    private string _firstName;
    private string _lastName;

    [NotifyComputed]
    public string FullName => $"{FirstName} {LastName}";
}

NotifyGen generates equality-guarded setters, PropertyChanged, and optional hooks:

partial void OnFirstNameChanged(string oldValue, string newValue);

Why NotifyGen

NotifyGen CommunityToolkit.Mvvm Fody.PropertyChanged
Runtime dependency None Toolkit runtime Weaver
Inspectable C# Yes Yes No (IL)
Required base class No (reuses host INPC) ObservableObject typical No
Scope Narrow INPC generator Full MVVM toolkit Property weaver

Recommended stack: NotifyGen for properties, CommunityToolkit for RelayCommand / messaging. See the hybrid sample.

Highlights

  • Field → property (_nameName) and C# 14 partial-property mode
  • [NotifyComputed] wires derived properties from the getter (or an explicit DependsOn list)
  • [NotifyAlso] with transitive closure, target-side NotifyFrom, child INPC, and collection membership
  • Typed On{Property}Changed(old, new) hooks, changing events, suppressable bulk updates
  • Property / property: / get: / set: metadata forwarding
  • [NotifyProperty] opt-in (and CommunityToolkit [ObservableProperty] takeover) so mixed ViewModels do not publish _logger
  • Analyzer diagnostics NOTIFY001–NOTIFY023; code fixes for missing partial (NOTIFY001 / NOTIFY006), underscore field names (NOTIFY002), unknown [NotifyAlso] names (NOTIFY003), and CommunityToolkit conversion (NOTIFY022 / NOTIFY023)

Docs

Requirements

  • .NET Standard 2.0+ consumers; Roslyn 4.8+ / modern .NET SDK for generation
  • C# 14 / preview language version for incomplete partial-property mode

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.1 119 8/12/2026
2.2.0 97 8/12/2026
2.1.0 90 8/12/2026
2.0.2 98 8/12/2026
2.0.1 94 8/11/2026
2.0.0 92 8/11/2026
1.10.0 95 8/11/2026
1.9.0 87 8/9/2026
1.8.0 104 8/8/2026
1.7.0 95 8/8/2026
1.6.0 105 7/26/2026
1.4.0 196 1/27/2026
1.3.2 138 1/26/2026
1.3.1 126 1/26/2026
1.2.0 128 1/26/2026
1.0.0 130 1/14/2026

v2.2.1:
• NOTIFY023 is Hidden so adding NotifyGen to a CommunityToolkit solution does not fail TreatWarningsAsErrors; the convert lightbulb still works
• Public docs link the live GitHub Pages site

v2.2.0:
• [NotifyProperty] and CommunityToolkit [ObservableProperty] switch a [Notify] type to opt-in generation so unmarked underscore fields stay private
• NOTIFY022 / NOTIFY023 convert CommunityToolkit property attributes with Fix All

v2.1.0:
• [NotifyComputed] wires derived properties from the getter or an explicit DependsOn list
• NOTIFY018 / NOTIFY019 / NOTIFY021 for empty, generated-member, and unsupported computed getters

v2.0.2:
• Honest NuGet tags and description (zero-runtime INPC, no required base class, CommunityToolkit coexistence)
• NuGet-safe absolute README links; pack demo/header assets
• Code fixes for NOTIFY002 (prefix private fields with _) and NOTIFY003 (nearest NotifyAlso name)

v2.0.0:
• Forward [property:]/[get:]/[set:] field attributes onto generated properties and accessors
• Suppress CS0657/CS0658 for accessor-target metadata on [Notify] fields (NOTIFYSPR0001/0002)
• Adoption assets: Avalonia + CommunityToolkit hybrid samples, migration guide, diagnostics catalog

v1.10.0:
• Reuse accessible existing INPC and INPC-changing host invokers without duplicate interfaces, events, or helpers
• Add direct NotifyOnCollectionChanged membership tracking with replacement/null detach handling and target deduplication
• Add NOTIFY013-NOTIFY017 safety diagnostics for incompatible hosts, collection declarations, and invalid generated names

v1.9.0:
• Add explicit target-side [NotifyAlso(NotifyFrom = true)] dependency declarations with transitive graph validation
• Add typed On{Property}Changed(oldValue, newValue) post-change hooks with equality suppression and field/partial-property support