ProMvvm.SourceGenerators 0.1.0

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

ProMvvm.SourceGenerators

NuGet License: MIT

ProMvvm.SourceGenerators is the compile-time analyzer package for ProMvvm. It generates strongly typed, reflection-free PropertyPath descriptors for ordinary properties, CommunityToolkit.Mvvm [ObservableProperty] fields, and ReactiveUI.SourceGenerators [Reactive] fields.

Installation

For normal applications, install only the main package:

dotnet add <your-project.csproj> package ProMvvm --version 0.1.0

ProMvvm depends on the matching generator package, so the analyzer is available automatically.

Use an explicit analyzer reference when you need to control its assets or version directly:

<ItemGroup>
  <PackageReference Include="ProMvvm" Version="0.1.0" />
  <PackageReference Include="ProMvvm.SourceGenerators"
                    Version="0.1.0"
                    PrivateAssets="all" />
</ItemGroup>

The explicit reference is especially useful for libraries that do not want the analyzer to flow to their consumers. If the ProMvvm runtime is supplied by a project or assembly reference, the generator can be the only NuGet package reference.

Usage

Annotate a partial model with [GeneratePropertyPaths]:

using CommunityToolkit.Mvvm.ComponentModel;
using ProMvvm;

[GeneratePropertyPaths]
public partial class SearchViewModel : ObservableObject
{
    [ObservableProperty]
    private string _searchText = string.Empty;
}

The generator creates SearchViewModelPropertyPaths.SearchText, which can be used directly with ProMvvm:

using var subscription = viewModel
    .WhenAnyValue(SearchViewModelPropertyPaths.SearchText)
    .Subscribe(observer);

The generated call site uses ordinary delegates and typed PropertyPath instances. It does not reflect, compile expressions, or require dynamic code, so it remains safe for trimming and NativeAOT.

Package behavior

  • The package targets netstandard2.0 as a Roslyn analyzer.
  • It contains no runtime or lib assets.
  • Generated descriptors require the ProMvvm runtime assembly at compile time.
  • The generator version is kept in lockstep with the runtime package version.
  • Generic target types currently report PMVVM001; see the main README for the complete supported surface and roadmap.

License

ProMvvm.SourceGenerators is licensed under the MIT License. Copyright © 2026 Wiesław Šoltés.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ProMvvm.SourceGenerators:

Package Downloads
ProMvvm

A high-performance, AOT-first MVVM observation library with ReactiveUI WhenAnyValue compatibility.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 104 8/19/2026