PinguApps.CodeStyle.Analyzers 0.1.0

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

PinguApps.CodeStyle.Analyzers

PinguApps.CodeStyle.Analyzers version PinguApps.CodeStyle.Analyzers downloads

PinguApps.CodeStyle.Analyzers is a small Roslyn analyzer package for PinguApps code style rules that need build-time enforcement.

Installation

Install the package into any project that should enforce the rules:

dotnet add package PinguApps.CodeStyle.Analyzers

NuGet automatically exposes analyzers from the package to the consuming project through PackageReference.

Rules

  • PACS0001: classes must not use primary constructors.

PACS0001 Class Primary Constructors

PACS0001 reports C# classes declared with primary constructors. Use an explicit constructor in classes instead. Records may continue to use primary constructors.

Invalid:

public class Widget(string name)
{
    public string Name { get; } = name;
}

Valid:

public class Widget
{
    public Widget(string name)
    {
        Name = name;
    }

    public string Name { get; }
}

Also valid:

public record Widget(string Name);
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
0.1.0 470 5/2/2026