Prognosis.Generators 8.1.0

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

Prognosis.Generators

Source generators and analyzers for the Prognosis service health graph. Turns node names into compile-time constants, wires discovered nodes into DI without reflection, and catches broken DependsOn edges before they reach a running graph.

This is a build-time package. It ships no runtime assembly and adds no dependency to your output.

Installation

dotnet add package Prognosis.Generators

The package is a development dependency, so it flows into your build and not into anything that consumes your library.

What it generates

HealthNames — node names as constants

Every node name declared in your project becomes a constant, so a typo is a build error rather than a node that silently never matches:

// Instead of: report.Nodes.First(n => n.Name == "Database")
report.Nodes.First(n => n.Name == HealthNames.Database);

AddDiscoveredNodes() — zero-reflection DI wiring

Discovers annotated services at compile time and emits their registration directly, so the graph is built without assembly scanning. This is what makes the DI path AOT- and trim-safe; see ADR-003 for why reflection was removed.

services.AddDiscoveredNodes();

What it diagnoses

ID Severity Meaning
PROGNOSIS001 Warning A DependsOn edge names a node that does not exist.

An edge that names a missing node is not a runtime error in Prognosis — the dependency simply never resolves and the parent's health is computed without it. The analyzer exists because that failure is silent and looks like a healthy graph.

Requirements

  • .NET Standard 2.0 target for the analyzer itself; usable from any project the Roslyn version in your SDK supports.
  • Pairs with Prognosis and, for AddDiscoveredNodes(), Prognosis.DependencyInjection.
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
8.1.0 84 10/9/2026
8.0.0 126 8/28/2026
7.0.0-beta.3 93 3/9/2026
7.0.0-beta.2 85 3/8/2026
7.0.0-beta.1 81 3/3/2026
7.0.0-alpha 115 3/2/2026