dotnet-diagnostics-core 0.14.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package dotnet-diagnostics-core --version 0.14.0
                    
NuGet\Install-Package dotnet-diagnostics-core -Version 0.14.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="dotnet-diagnostics-core" Version="0.14.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="dotnet-diagnostics-core" Version="0.14.0" />
                    
Directory.Packages.props
<PackageReference Include="dotnet-diagnostics-core" />
                    
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 dotnet-diagnostics-core --version 0.14.0
                    
#r "nuget: dotnet-diagnostics-core, 0.14.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 dotnet-diagnostics-core@0.14.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=dotnet-diagnostics-core&version=0.14.0
                    
Install as a Cake Addin
#tool nuget:?package=dotnet-diagnostics-core&version=0.14.0
                    
Install as a Cake Tool

dotnet-diagnostics-core

The transport-agnostic .NET diagnostics engine behind the dotnet-diagnostics-mcp MCP server and the dotnet-diagnostics-cli. It attaches to a live .NET process over the runtime diagnostic IPC socket — no modification to the target app — and turns the raw EventPipe / ClrMD / TraceEvent streams into structured results.

This package exists so other hosts can call the same engine in-process, without shelling out to a tool. The first such consumer is the BenchmarkDotNet diagnoser (dotnet-diagnostics-benchmarkdotnet).

dotnet add package dotnet-diagnostics-core

Target framework: net10.0. Platform: the engine attaches over the diagnostic IPC socket; ClrMD-backed operations (heap/thread snapshots, dumps) additionally need CAP_SYS_PTRACE on Linux and the same UID as the target. See the repo docs for the deployment matrix.

Supported public surface (Pattern B — curated facade)

⚠️ Pre-1.0 / unstable. While this package is versioned 0.x it carries no SemVer API stability guarantee. Only the entry points listed below are intended for external use; every other public type is an implementation detail that will be internalized incrementally and may change or disappear without a major-version bump. Depend on the facade, not on the plumbing.

The supported entry points are the static use-case classes; each method returns a DiagnosticResult<T> envelope (success payload, DiagnosticError, and NextActionHints):

Use-case class What it does
ProcessInspectionUseCases Discover .NET processes; process / capability / container / runtime-config / triage views.
EventCollectionUseCases EventPipe collection: counters, exceptions, GC, GC DATAS, logs, JIT, threadpool, contention, db, activities, event-source, event catalog.
HeapInspectionUseCases Live or dump heap walk + drilldown handles.
ProcessDumpUseCases Write a process dump (Mini / Triage / WithHeap / Full).
ByteMaterializationUseCases Stream module (PE/PDB) or dump bytes.

Supporting types that are part of the facade because the use-cases return or accept them:

  • DiagnosticResult / DiagnosticResult<T>, DiagnosticError, NextActionHint — the result envelope.
  • The per-collector snapshot/result records returned by the use-cases (e.g. CounterSnapshot, GcSummary, ContentionSnapshot, …).

Example

using DotnetDiagnostics.Core.UseCases;

// Snapshot EventCounters for ~5s from a target PID.
DiagnosticResult<CounterSnapshot> result =
    await EventCollectionUseCases.SnapshotCounters(processId: pid, durationSeconds: 5);

if (result.IsSuccess)
{
    foreach (var hint in result.Hints)
        Console.WriteLine(hint.Message);
}

Not in scope for this package

  • The MCP tool surface, HTTP transport and bearer auth live in dotnet-diagnostics-mcp.
  • The one-shot / REPL command line lives in dotnet-diagnostics-cli.

License

MIT — see the repository.

Product Compatible and additional computed target framework versions.
.NET 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 dotnet-diagnostics-core:

Package Downloads
dotnet-diagnostics-benchmarkdotnet

A BenchmarkDotNet IDiagnoser for net8.0/net9.0/net10.0 benchmark projects that attaches the dotnet-diagnostics engine in-process to a benchmark's child process and captures EventPipe perf indicators (GC, contention, thread pool, exceptions, JIT, counters, …) as JSON artifacts plus a per-run "biggest offenders" report. Tag benchmark methods with [DiagnosticKind] and add [DotnetDiagnosticsDiagnoser] to the benchmark class.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.32.1 60 10/22/2026
0.31.0 109 10/16/2026
0.30.0 123 10/15/2026
0.29.0 131 10/13/2026
0.28.0 305 9/30/2026
0.27.0 158 9/18/2026
0.26.0 142 9/17/2026
0.25.0 737 8/28/2026
0.24.0 1,213 8/19/2026
0.23.0 156 8/13/2026
0.22.0 151 8/1/2026
0.21.0 151 7/30/2026
0.20.0 144 7/29/2026
0.19.0 146 7/21/2026
0.18.0 143 7/20/2026
0.17.0 153 7/7/2026
0.16.0 148 7/2/2026
0.15.0 156 7/2/2026
0.14.0 186 6/11/2026
0.13.0 150 6/10/2026
Loading failed