CSharpStyleChecker 2.0.0
dotnet add package CSharpStyleChecker --version 2.0.0
NuGet\Install-Package CSharpStyleChecker -Version 2.0.0
<PackageReference Include="CSharpStyleChecker" Version="2.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="CSharpStyleChecker" Version="2.0.0" />
<PackageReference Include="CSharpStyleChecker"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add CSharpStyleChecker --version 2.0.0
#r "nuget: CSharpStyleChecker, 2.0.0"
#:package CSharpStyleChecker@2.0.0
#addin nuget:?package=CSharpStyleChecker&version=2.0.0
#tool nuget:?package=CSharpStyleChecker&version=2.0.0
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.
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.