InpcFieldGenerator 1.0.0-alpha.2
dotnet add package InpcFieldGenerator --version 1.0.0-alpha.2
NuGet\Install-Package InpcFieldGenerator -Version 1.0.0-alpha.2
<PackageReference Include="InpcFieldGenerator" Version="1.0.0-alpha.2"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="InpcFieldGenerator" Version="1.0.0-alpha.2" />
<PackageReference Include="InpcFieldGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add InpcFieldGenerator --version 1.0.0-alpha.2
#r "nuget: InpcFieldGenerator, 1.0.0-alpha.2"
#:package InpcFieldGenerator@1.0.0-alpha.2
#addin nuget:?package=InpcFieldGenerator&version=1.0.0-alpha.2&prerelease
#tool nuget:?package=InpcFieldGenerator&version=1.0.0-alpha.2&prerelease
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
fieldkeyword. - 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
- Reference the attributes
ImportInpcFieldGenerator.Abstractionsin your project or share the project reference when developing locally. - 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(); } - Build your project
The generator emits partial implementations that call into yourRaisePropertyChanged(and optionallyRaisePropertyChanging) helpers.
Prerequisites: .NET SDK 10 preview (pinned via
global.json) and a compiler that understands the C# 14 previewfieldkeyword.
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
- Attribute reference:
docs/AttributeReference.md - Implementation plan:
docs/ImplementationPlan.md - Contributing guide:
docs/Contributing.md - Changelog:
docs/Changelog.md
CI & releases
- Continuous integration:
.github/workflows/ci.ymlbuilds, tests, packs, and publishes coverage on every push and PR (Ubuntu + Windows matrix). - Release automation:
.github/workflows/release.ymlruns the full validation suite, pushes packages to NuGet whenNUGET_API_KEYis available, and attaches artifacts to GitHub releases triggered by tags (v*) or manual dispatch. - Packages are versioned via the shared
Directory.Build.propssettings (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.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- InpcFieldGenerator.Abstractions (>= 1.0.0-alpha.2)
- Microsoft.CodeAnalysis.CSharp (>= 4.11.0)
- System.Collections.Immutable (>= 8.0.0)
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 |
|---|---|---|
| 1.0.0-alpha.2 | 268 | 11/12/2025 |
| 1.0.0-alpha.1 | 256 | 11/12/2025 |
See CHANGELOG for the latest updates.