ModernMediator.Generators 2.2.1

dotnet add package ModernMediator.Generators --version 2.2.1
                    
NuGet\Install-Package ModernMediator.Generators -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="ModernMediator.Generators" 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="ModernMediator.Generators" Version="2.2.1" />
                    
Directory.Packages.props
<PackageReference Include="ModernMediator.Generators">
  <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 ModernMediator.Generators --version 2.2.1
                    
#r "nuget: ModernMediator.Generators, 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 ModernMediator.Generators@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=ModernMediator.Generators&version=2.2.1
                    
Install as a Cake Addin
#tool nuget:?package=ModernMediator.Generators&version=2.2.1
                    
Install as a Cake Tool

ModernMediator.Generators

Source generators for ModernMediator. Eliminates runtime reflection on the request-dispatch path and enables Native AOT compilation.

This package is shipped transitively via the core ModernMediator package's project reference. You normally do not install this package directly. Installing ModernMediator includes these generators automatically.

If you are building a project that explicitly opts into the source-generated dispatch path (AddModernMediatorGenerated() rather than AddModernMediator() with assembly scanning), you may want this package referenced explicitly to ensure the generators are active during compilation. In most cases, the transitive reference from the core package is sufficient.

Diagnostics

The generators emit compile-time diagnostics with the prefix MM (for example, MM001 flags duplicate handler registrations). MM009 detects dispatcher overload mismatch at compile time, paralleling the runtime [MM201] prefix surfaced by the core dispatcher when the same condition slips past the analyzer (for example, across precompiled assembly boundaries). See the core ModernMediator README for the full diagnostic catalog.

License

MIT. See LICENSE in the repository root.

There are no supported framework assets in this 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 173 5/24/2026
2.1.0 135 3/22/2026