CSharpStyleChecker 2.0.0

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

CSharpStyleChecker

Roslyn analyzer that enforces the C# style of CopilotAIWorkflow as compiler errors (CSC001–CSC009). Add it as a development dependency:

<PackageReference Include="CSharpStyleChecker" Version="2.*" />

Rebuild. Violations surface as compiler errors. The analyzers load from analyzers/dotnet/cs and bundle ExitPoints.dll; no second package and no PrivateAssets are needed. The checker applies to the referencing project only; it does not flow to downstream projects.

2.0.0 is breaking: CSC001 defaults to 130 characters (was 160). Keep the old limit in .editorconfig:

[*.cs]
build_property.csc_max_line_length = 160

Rule reference: README — CSharpStyleChecker. Changes: CHANGELOG.

Requirements

SDK-style netstandard2.0+ or .NET Core App project; .NET SDK 9.0.300+ or Visual Studio 2022 17.14+ (Roslyn 4.14).

Migration

Deprecated Use instead
PackageReference CSharpStyleValidator CSharpStyleChecker
Analyzer IDs CSV001–CSV008 CSC001–CSC008

License

MIT. See LICENSE.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on CSharpStyleChecker:

Package Downloads
ZeroAlloc

Zero-allocation string formatting and binary serialization library with Roslyn source generators. Features: compile-time optimized ZA.String() and ZA.Bytes() APIs, endian-aware wrappers (U16BE, I32LE, etc.), VarInt encoding, length-prefixed string encodings, and generated binary parsers. Perfect for network protocols, CAN/FlexRay, embedded systems, and high-performance logging. Requires .NET 10+.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 99 11/10/2026
1.2.0 105 11/5/2026
1.1.0 123 10/9/2026
1.0.1 945 7/13/2026
1.0.0 683 7/8/2026