ModulusKit.Analyzers 4.0.0

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

ModulusKit.Analyzers

Roslyn analyzers and code fixes for enforcing Modulus modular architecture conventions directly in your IDE.

Installation

dotnet add package ModulusKit.Analyzers

Or as an analyzer reference in your .csproj:

<PackageReference Include="ModulusKit.Analyzers"
                  OutputItemType="Analyzer"
                  ReferenceOutputAssembly="false" />

Note: This is a development-dependency (analyzer) package -- it does not flow transitively through other ModulusKit.* packages or through project references. Add the reference above to each project where the MOD rules should run. Solutions scaffolded by the modulus CLI have this wired up already.

Rules

Rule Severity Description Code Fix
MOD001 Error Module boundary violation -- cross-module reference to non-Integration project --
MOD002 Warning Handler not returning Result or Result<T> --
MOD003 Warning Throwing exceptions for expected errors in handlers instead of returning Error Yes
MOD004 Warning Infrastructure attributes (EF, JSON) in Domain layer Yes
MOD005 Info Public setter on entity property Yes

Configuration

Adjust severities in .editorconfig:

[*.cs]
dotnet_diagnostic.MOD001.severity = error
dotnet_diagnostic.MOD002.severity = warning
dotnet_diagnostic.MOD003.severity = warning
dotnet_diagnostic.MOD004.severity = warning
dotnet_diagnostic.MOD005.severity = suggestion

Suppress individual occurrences with #pragma:

#pragma warning disable MOD001
using EShop.Catalog.Domain.Products;
#pragma warning restore MOD001

Learn More

See the Modulus documentation for full rule reference with examples.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • 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
4.0.0 94 7/26/2026
3.1.0 293 7/26/2026
3.0.0 231 7/26/2026
2.1.0 205 7/4/2026
2.0.0 108 7/3/2026
1.2.5 124 3/15/2026
1.2.4 113 3/15/2026
1.2.3 112 3/14/2026
1.2.2 111 3/14/2026
1.2.1 116 3/14/2026
1.2.0 118 3/14/2026
1.1.1 115 3/8/2026
1.1.0 115 3/5/2026
1.0.1 118 3/5/2026