Alvecta.Analyzers
1.1.23
dotnet add package Alvecta.Analyzers --version 1.1.23
NuGet\Install-Package Alvecta.Analyzers -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" 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" Version="1.1.23" />
<PackageReference Include="Alvecta.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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 --version 1.1.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Alvecta.Analyzers, 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@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&version=1.1.23
#tool nuget:?package=Alvecta.Analyzers&version=1.1.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Alvecta.Analyzers
General-purpose Roslyn analyzers used across Alvecta codebases. Reference the package solution-wide; the rules below run as warnings by default.
Rules
| ID | Category | Description |
|---|---|---|
| ALV0001 | Naming | File name should match the contained type name. |
| ALV0002 | Maintainability | A file should contain a single top-level type. |
| ALV0003 | Alvecta.Design | CancellationToken parameters must not have a default value. |
| ALV0004 | Alvecta.Usage | Prefer .Where(predicate) before a single-element LINQ operator. |
| ALV0005 | Alvecta.Design | Do not inject HttpClient directly. |
| ALV0006 | Naming | An implementation should end with its interface role suffix. |
| ALV0007 | Naming | Exception types should end with Exception. |
| ALV0008 | Alvecta.Design | Top-level types should be public, not internal. |
| ALV0009 | Alvecta.Design | Do not inject DbContext directly. |
| ALV0011 | Maintainability | Using directives should be sorted. |
| ALV0012 | Maintainability | Do not change the value of a method parameter. |
| ALV0013 | Alvecta.Usage | Register Refit clients with the generated-client overload. |
Usage
<PackageReference Include="Alvecta.Analyzers" PrivateAssets="all" />
PrivateAssets="all" keeps the analyzer out of your package's dependency closure — it affects
your build only, not your consumers'.
Configuration
Rules can be tuned per family via their category, e.g. in .editorconfig:
dotnet_analyzer_diagnostic.category-Alvecta.Design.severity = error
Or individually by ID:
dotnet_diagnostic.ALV0004.severity = none
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 | 86 | 9/28/2026 |
| 1.1.22 | 101 | 9/17/2026 |
| 1.1.21 | 95 | 9/17/2026 |
| 1.1.20 | 93 | 9/15/2026 |
| 1.1.19 | 90 | 9/14/2026 |
| 1.1.18 | 106 | 9/9/2026 |
| 1.1.17 | 106 | 8/21/2026 |
| 1.0.16 | 112 | 8/18/2026 |
| 1.0.15 | 103 | 8/18/2026 |
| 1.0.14 | 112 | 8/18/2026 |
| 1.0.13 | 126 | 7/30/2026 |
| 1.0.12 | 120 | 7/17/2026 |
| 1.0.11 | 214 | 6/30/2026 |
| 1.0.10 | 126 | 6/30/2026 |
| 1.0.9 | 124 | 6/30/2026 |
| 1.0.8 | 130 | 6/26/2026 |
| 1.0.7 | 118 | 6/26/2026 |
| 1.0.6 | 121 | 6/26/2026 |
| 1.0.5 | 141 | 6/26/2026 |
| 1.0.4 | 128 | 6/25/2026 |
Loading failed