PrimaryConstructorAnalyzer 1.0.6

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

Primary Constructor Analyzer

Build status NuGet

C# 12 introduced primary constructors but the only drawback at the moment is that we can't declare parameters as readonly.

I'm quite sure this will come later but here is a simple analyzer to detect mutations to those parameters.

Just reference the nuget in your favorite compatible IDE, and it should work.

Visual Studio

Visual Studio Code

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.0.6 189,291 12/6/2023
1.0.5 233 11/24/2023
1.0.4 199 11/24/2023
1.0.3 200 11/24/2023
1.0.2 190 11/24/2023
1.0.1 192 11/24/2023
1.0.0 207 11/24/2023