Alvecta.Analyzers.PrimitiveObsession 1.1.26

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

Alvecta.Analyzers.PrimitiveObsession

The Alvecta primitive-obsession Roslyn analyzer, shipped as a standalone package so it can be applied selectively — reference it only from the assemblies it should police (typically the domain and application layers), rather than solution-wide.

The analyzer assumes every compilation it sees is in scope and concerns itself only with which members offend, so scoping is controlled by where you reference the package, not by configuration.

Rules

ID Category Description
ALV1001 Alvecta.Design Flags members typed as raw primitives (bare, nullable, or inside arrays and generic type arguments such as IEnumerable<string>) where a value object is expected.

Usage

Reference it only from the projects you want it to police:

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

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

Configuration

dotnet_diagnostic.ALV1001.severity = error
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.26 0 10/9/2026
1.1.25 0 10/9/2026
1.1.24 65 10/7/2026
1.1.23 110 9/28/2026
1.1.22 101 9/17/2026
1.1.21 95 9/17/2026
1.1.20 101 9/15/2026
1.1.19 94 9/14/2026
1.1.18 111 9/9/2026
1.1.17 113 8/21/2026
1.0.16 131 8/18/2026
1.0.15 121 8/18/2026
1.0.14 113 8/18/2026
1.0.13 125 7/30/2026
1.0.12 133 7/17/2026
1.0.11 194 6/30/2026
1.0.10 123 6/30/2026
1.0.9 127 6/30/2026
1.0.8 132 6/26/2026
1.0.7 125 6/26/2026
Loading failed