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
<PackageReference Include="Alvecta.Analyzers.PrimitiveObsession" Version="1.1.26"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Alvecta.Analyzers.PrimitiveObsession" Version="1.1.26" />
<PackageReference Include="Alvecta.Analyzers.PrimitiveObsession"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Alvecta.Analyzers.PrimitiveObsession --version 1.1.26
#r "nuget: Alvecta.Analyzers.PrimitiveObsession, 1.1.26"
#:package Alvecta.Analyzers.PrimitiveObsession@1.1.26
#addin nuget:?package=Alvecta.Analyzers.PrimitiveObsession&version=1.1.26
#tool nuget:?package=Alvecta.Analyzers.PrimitiveObsession&version=1.1.26
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
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 |