Hantsch.CSharp.StyleCop 1.0.4

dotnet add package Hantsch.CSharp.StyleCop --version 1.0.4
                    
NuGet\Install-Package Hantsch.CSharp.StyleCop -Version 1.0.4
                    
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="Hantsch.CSharp.StyleCop" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hantsch.CSharp.StyleCop" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Hantsch.CSharp.StyleCop" />
                    
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 Hantsch.CSharp.StyleCop --version 1.0.4
                    
#r "nuget: Hantsch.CSharp.StyleCop, 1.0.4"
                    
#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 Hantsch.CSharp.StyleCop@1.0.4
                    
#: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=Hantsch.CSharp.StyleCop&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Hantsch.CSharp.StyleCop&version=1.0.4
                    
Install as a Cake Tool

Hantsch.CSharp.StyleCop

Hantsch.CSharp.StyleCop is a NuGet package that bundles the StyleCop setup I use in my own C# projects, so I can outsource some arguing to analyzers and get back to writing code.

It depends on StyleCop.Analyzers and ships shared analyzer configuration transitively, so consuming projects automatically receive the same rules and settings without every repository inventing its own tiny bureaucracy.

What the package includes

  • stylecop.json
  • hantsch.stylecop.ruleset
  • config/Hantsch.CSharp.StyleCop.globalconfig
  • buildTransitive/hantsch.csharp.stylecop.props

In other words: the package arrives with opinions, luggage, and receipts.

Who this is for

This package is primarily maintained for my own projects, but anyone is free to use it if the included rules match their preferred C# style and tolerance for a mildly bossy robot.

License

This project is available under the MIT License. See LICENSE for details, which is the nice license that mostly says “have fun, just do not blame me if the code gets weird.”

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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.0.4 385 4/17/2026
1.0.3 355 4/17/2026
1.0.2 1,134 11/5/2020
1.0.1 1,058 11/4/2020
1.0.0 1,037 11/4/2020