Agentics.Extensions.Aspire.NextJs 0.2.6

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

Agentics.Extensions.Aspire.NextJs

Local-development diagnostics and dashboard actions for Next.js and Turbopack. The extension works with both AddNodeApp and AddNextJsApp resources.

dotnet add package Agentics.Extensions.Aspire.NextJs
var web = builder.AddNodeApp("web", "../web", "unused")
    .WithNextJsDefaults()
    .WithNpm(install: true)
    .WithRunScript("dev")
    .WithTurbopackTracing()
    .ClearTurbopackCache(limit: "1gb")
    .WithSlowStartDetector(options =>
    {
        options.SlowCompilationThreshold = TimeSpan.FromSeconds(10);
        options.CacheWarningLimit = "1gb";
    });

What the extensions do

  • WithNextJsDefaults() applies the defaults every Next.js development resource should share: a fixed 16 GiB V8 old-space limit, NEXT_DISABLE_MEM_OVERRIDE=1 so Next.js never falls back to half of host RAM, and telemetry disabled. Pass maxOldSpaceSizeMegabytes to override the heap limit for an exceptional app.
  • DisableTelemetry() sets NEXT_TELEMETRY_DISABLED=1. Besides opting out of anonymous usage reporting, it stops Next.js from spawning detached-flush.js on exit. That detached child uploads the telemetry batch so the command need not wait on the network — but when the upload can neither complete nor fail (no egress, a black-holed connection) it spins at ~100% CPU indefinitely, and every restart adds another one. Apply it to every Next.js resource.
  • WithTurbopackTracing() sets NEXT_TURBOPACK_TRACING=1. Next writes the detailed binary trace to .next/dev/trace-turbopack; open it with npx next internal trace .next/dev/trace-turbopack.
  • ClearTurbopackCache(limit: "1gb") adds a highlighted Clear Turbopack cache resource command. It also clears the generated cache before AppHost startup when it has reached the limit. The dashboard command stops Next.js, clears the cache, and starts the resource again.
  • WithSlowStartDetector() watches Next's lightweight .next/dev/trace for completed compile-path and ensure-page spans. A slow compile or oversized cache writes a warning to the resource log, adds diagnostic resource properties, and sends an Aspire notification linking to the resource command.

The detector deliberately reads the lightweight JSON trace rather than parsing trace-turbopack: the latter is a large binary diagnostic intended for the Next trace viewer. Detailed tracing remains opt-in because even a short session can produce more than 100 MB of trace data.

Both cache layouts are supported:

  • Next.js 16: .next/dev/cache/turbopack
  • Older Next.js versions: .next/cache/turbopack

All cache content is generated and can be recreated by Next.js.

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

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
0.2.6 125 9/3/2026
0.2.5 102 8/29/2026
0.2.4 106 8/20/2026
0.2.3 119 8/3/2026