SnowBank.Networking.PacketCapture 7.4.2

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

SnowBank.Networking.PacketCapture

Captures HTTP request and response traffic for diagnostics and testing of distributed .NET applications.

Concept

Register the capture in your pipeline and every HTTP exchange (headers, timing, and within limits bodies) is recorded to an IPacketCaptureManager, which you can then read back from a test or a diagnostics endpoint.

It is designed for short-lived capture (a test, a repro, a targeted investigation), not long-running production tracing: captured data is held in memory for the duration of the run.

How to use

dotnet add package SnowBank.Networking.PacketCapture

On an ASP.NET Core host, register the services and add the middleware:

builder.Services.AddPacketCapture();

var app = builder.Build();
app.UsePacketCapture();

Then resolve IPacketCaptureManager to inspect the captured request/response exchanges:

var capture = app.Services.GetRequiredService<IPacketCaptureManager>();
// read back the captured exchanges via `capture` (headers, status, timing, ...)

Capture can also be attached at the Kestrel level via ListenOptions.UsePacketCapture(...).

Because captured data accumulates in memory, keep capture scoped to short tests or targeted repros.

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 was computed.  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.  net11.0 is compatible. 
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 SnowBank.Networking.PacketCapture:

Package Downloads
SnowBank.Testing.Framework

SDK for writing tests for distributed .NET applications

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
7.4.2 0 7/13/2026
7.4.1 60 7/5/2026
7.4.0 87 5/10/2026