Alvecta.Analyzers.MaterializationNullability 1.1.23

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

Alvecta.Analyzers.MaterializationNullability

A Roslyn DiagnosticSuppressor that suppresses CS8618 ("non-nullable member is uninitialized when exiting constructor") on private parameterless constructors — the constructors that exist solely so an ORM (e.g. EF Core) can materialize a type and populate its members via backing fields.

Public and other constructors are left untouched, so a genuine "forgot to initialize a member" mistake is still reported. This keeps the nullable safety net while removing the per-entity #pragma warning disable CS8618 noise.

Suppressions

ID Suppresses Where
ALV9001 CS8618 Private parameterless (ORM materialization) constructors

Usage

Reference it only from the assemblies whose entities use the materialization-constructor pattern (typically the domain layer):

<PackageReference Include="Alvecta.Analyzers.MaterializationNullability" PrivateAssets="all" />

PrivateAssets="all" keeps the analyzer out of your package's dependency closure — it affects your build only, not your consumers'.

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
1.1.23 79 9/28/2026
1.1.22 87 9/17/2026
1.1.21 86 9/17/2026
1.1.20 84 9/15/2026
1.1.19 88 9/14/2026
1.1.18 98 9/9/2026
1.1.17 104 8/21/2026
1.0.16 103 8/18/2026
1.0.15 103 8/18/2026
1.0.14 95 8/18/2026
1.0.13 116 7/30/2026
1.0.12 111 7/17/2026
1.0.11 136 6/30/2026
1.0.10 126 6/30/2026
1.0.9 124 6/30/2026
1.0.8 137 6/26/2026
1.0.7 127 6/26/2026