Specht.CodeAnalysis 0.4.2-preview

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

title: "Specht.CodeAnalysis package" description: "Install the Specht analyzer and code fixes into a consumer project" type: reference

Specht.CodeAnalysis

Install Specht.CodeAnalysis as a private PackageReference in projects that should load the analyzer and code fixes. The package includes MSBuild integration that finds the nearest .specht/manifest.json above the project directory and supplies consumer analysis inputs to Roslyn.

<PackageReference Include="Specht.CodeAnalysis" Version="$(SpechtVersion)" PrivateAssets="all" />

Set SpechtRoot when the project is outside the repository tree or when the nearest manifest is not the intended repository. Add extra input files through SpechtAdditionalRecords; each item must set SpechtInputKind to the input role and may set SpechtRelativePath when the path cannot be derived from the root. Add SpechtTestEvidence items for explicit test evidence; the package delivers them under the test-evidence input kind. Declare both item types in the project body.

On a clean checkout no evidence exists yet. The first build recognises test methods provisionally and succeeds with mandatory enforcement and warnings as errors. Run dotnet test --list-tests, then dotnet test; the logger writes obj/specht-test-evidence/<project>-<framework>.json. Supply that file as SpechtTestEvidence to rebuild with authoritative recognition, and run specht evidence obj/specht-test-evidence to reconcile. An artifact that does not match the build's project, framework, configuration, sources or policy is ignored and recognition stays provisional.

For an xUnit v2/VSTest test project the package registers the specht VSTest logger: it adds its build/vstest/<tfm> folder to VSTestTestAdapterPath and specht to VSTestLogger. Passing --logger or --settings on dotnet test replaces the registered logger, so no evidence is written unless the command also names --logger specht.

For tagged .feature files as the claim catalogue, see native Gherkin claim input for manifest settings and the clean-checkout evidence sequence.

Diagnostic severity and suppression use standard Roslyn configuration. The package adds no application runtime dependency.

See the diagnostic reference for each published diagnostic, its reporting conditions, and available code fixes.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • 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.4.2-preview 0 11/4/2026