InpcFieldGenerator.Abstractions 1.0.0-alpha.2

This is a prerelease version of InpcFieldGenerator.Abstractions.
dotnet add package InpcFieldGenerator.Abstractions --version 1.0.0-alpha.2
                    
NuGet\Install-Package InpcFieldGenerator.Abstractions -Version 1.0.0-alpha.2
                    
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="InpcFieldGenerator.Abstractions" Version="1.0.0-alpha.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InpcFieldGenerator.Abstractions" Version="1.0.0-alpha.2" />
                    
Directory.Packages.props
<PackageReference Include="InpcFieldGenerator.Abstractions" />
                    
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 InpcFieldGenerator.Abstractions --version 1.0.0-alpha.2
                    
#r "nuget: InpcFieldGenerator.Abstractions, 1.0.0-alpha.2"
                    
#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 InpcFieldGenerator.Abstractions@1.0.0-alpha.2
                    
#: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=InpcFieldGenerator.Abstractions&version=1.0.0-alpha.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=InpcFieldGenerator.Abstractions&version=1.0.0-alpha.2&prerelease
                    
Install as a Cake Tool

INPC Field Generator

An incremental Roslyn source generator that adds high-quality INotifyPropertyChanged plumbing to ReactiveUI view models using the C# 14 field keyword. Annotate your partial properties with [ReactiveField] and let the generator take care of backing fields, change notifications, and cross-property updates.

Why this generator?

  • Works incrementally with C# 14 partial properties and the field keyword.
  • Integrates with ReactiveUI notification patterns (RaisePropertyChanged, RaisePropertyChanging).
  • Provides granular configuration through attributes and assembly defaults.
  • Ships with an Avalonia desktop sample that demonstrates generator output end-to-end.

Installation

Install both the analyzer package and the attribute library into your solution:

dotnet add package InpcFieldGenerator --prerelease
dotnet add package InpcFieldGenerator.Abstractions --prerelease

The generator package sets LangVersion=preview automatically through its buildTransitive props. If you already control the language version, set InpcFieldGeneratorSetLangVersion=false in your project file to keep your existing configuration.

Getting started

  1. Reference the attributes
    Import InpcFieldGenerator.Abstractions in your project or share the project reference when developing locally.
  2. Annotate your view models
    using InpcFieldGenerator.Abstractions;
    using ReactiveUI;
    
    [ReactiveViewModel(NotifyOnChanging = true)]
    public partial class PersonViewModel : ReactiveObject
    {
        [ReactiveField(AlsoNotify = [nameof(FullName)])]
        public partial string FirstName { get; set; }
    
        [ReactiveField(AlsoNotify = [nameof(FullName)])]
        public partial string LastName { get; set; }
    
        public string FullName => $"{FirstName} {LastName}".Trim();
    }
    
  3. Build your project
    The generator emits partial implementations that call into your RaisePropertyChanged (and optionally RaisePropertyChanging) helpers.

Prerequisites: .NET SDK 10 preview (pinned via global.json) and a compiler that understands the C# 14 preview field keyword.

Avalonia sample application

Explore the end-to-end workflow with the desktop sample:

dotnet run --project samples/ReactiveUiSample

The sample uses Avalonia + ReactiveUI to show live bindings, cross-property notifications, and property-changing diagnostics powered by the generator.

Documentation

CI & releases

  • Continuous integration: .github/workflows/ci.yml builds, tests, packs, and publishes coverage on every push and PR (Ubuntu + Windows matrix).
  • Release automation: .github/workflows/release.yml runs the full validation suite, pushes packages to NuGet when NUGET_API_KEY is available, and attaches artifacts to GitHub releases triggered by tags (v*) or manual dispatch.
  • Packages are versioned via the shared Directory.Build.props settings (VersionPrefix/VersionSuffix).

Contributing

We welcome issues and pull requests. Please read the contributing guide before opening a PR.

License

This project is licensed under the MIT 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 is compatible.  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 is compatible.  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.
  • .NETStandard 2.0

    • No dependencies.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on InpcFieldGenerator.Abstractions:

Package Downloads
InpcFieldGenerator

Incremental source generator that builds INPC change-notification plumbing for ReactiveUI view models.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.2 278 11/12/2025
1.0.0-alpha.1 268 11/12/2025

See CHANGELOG for the latest updates.