Prognosis.Generators
8.1.0
dotnet add package Prognosis.Generators --version 8.1.0
NuGet\Install-Package Prognosis.Generators -Version 8.1.0
<PackageReference Include="Prognosis.Generators" Version="8.1.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Prognosis.Generators" Version="8.1.0" />
<PackageReference Include="Prognosis.Generators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Prognosis.Generators --version 8.1.0
#r "nuget: Prognosis.Generators, 8.1.0"
#:package Prognosis.Generators@8.1.0
#addin nuget:?package=Prognosis.Generators&version=8.1.0
#tool nuget:?package=Prognosis.Generators&version=8.1.0
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.
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 |