Mediarq.HealthChecks 1.5.1

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

Mediarq.HealthChecks

Catches a missing or ambiguous handler before it becomes a HandlerNotFoundException at the first dispatch in production: an IHealthCheck for your /health endpoint, plus an optional check that runs once at host startup and fails the app fast.

dotnet add package Mediarq.HealthChecks

Usage

builder.Services.AddHealthChecks()
    .AddMediarqHandlerRegistrationCheck(assemblies: typeof(Program).Assembly);

Exposes it the usual way:

app.MapHealthChecks("/health");

Healthy when every ICommand/IQuery closed type discovered in assemblies resolves to exactly one registered IRequestHandler<TRequest, TResponse>; otherwise Unhealthy, with the offending types and their handler counts (0 = missing, 2+ = ambiguous) in the result's Data.

Fail fast at startup

builder.Services.AddMediarqHandlerValidationOnStartup(typeof(Program).Assembly);

Runs the same check once, synchronously, as part of host startup — a misconfiguration throws InvalidOperationException and the app never starts accepting traffic, instead of surfacing on whichever request happens to hit the broken handler first.

assemblies defaults to the entry assembly when omitted; pass every assembly that declares commands/queries or handlers explicitly in a modular app.

Learn more

Wiring extensions · Full README

MIT © Nicolas Rouffart

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Mediarq.HealthChecks:

Package Downloads
Mediarq.Aspire

.NET Aspire ServiceDefaults integration for Mediarq: one call from your project's own ServiceDefaults Extensions.cs wires Mediarq's OpenTelemetry instrumentation and the handler-registration health check into the Aspire dashboard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.1 137 7/26/2026
1.5.0 128 7/26/2026