Personix.CodeStyle 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Personix.CodeStyle --version 1.0.0
                    
NuGet\Install-Package Personix.CodeStyle -Version 1.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="Personix.CodeStyle" Version="1.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="Personix.CodeStyle" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Personix.CodeStyle">
  <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 Personix.CodeStyle --version 1.0.0
                    
#r "nuget: Personix.CodeStyle, 1.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 Personix.CodeStyle@1.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=Personix.CodeStyle&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Personix.CodeStyle&version=1.0.0
                    
Install as a Cake Tool

Personix.CodeStyle

Shared code style rules for Personix .NET projects, delivered as a global AnalyzerConfig.

Referencing this package turns the agreed rules into build errors, so they hold in CI and on every machine — instead of depending on whether each developer happens to have the same editor settings. Changing a rule means bumping one package version, not editing nine repositories.

Installation

<PackageReference Include="Personix.CodeStyle" Version="1.0.0" PrivateAssets="all" />

PrivateAssets="all" keeps the rules from flowing to consumers of your package — they govern your build, not theirs. Put the reference in Directory.Build.props to cover every project in a repository at once.

What it enforces

Rule Severity Meaning
IDE0011 error Braces on every control-flow statement, including single-line if.
IDE0161 warning File-scoped namespace declarations.
IDE0005 warning No unused using directives.
IDE0051 / IDE0052 warning No unread private members.
IDE0060 suggestion Unused parameters.

Braces are an error rather than a warning on purpose: the failure mode is a second statement added under an unbraced if, which silently falls outside the condition and reads as if it did not.

What it does not cover

Formatting that the editor applies as you type — indentation, encoding, line endings — comes from .editorconfig, which MSBuild reads from disk and cannot be delivered in a package. Keep a small .editorconfig in each repository for that. It changes rarely; this package holds the rules that actually change.

Overriding a rule

A repository-local .editorconfig takes precedence over this global config, so a project with a genuine reason can relax a specific rule locally. That is intended — the package sets the default, not an absolute.

Licence

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

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.0 34 9/22/2026
1.0.5 113 9/11/2026
1.0.4 133 8/31/2026
1.0.3 195 8/27/2026
1.0.2 146 8/27/2026
1.0.1 154 8/18/2026
1.0.0 204 8/1/2026