Nextended.Aspire 10.1.34

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

Nextended

Nextended.Aspire

NuGet Downloads License

Conditional AppHost builder extensions โ€” WithReferenceIf / WaitForIf / WithExplicitStartIf, strongly typed environment variables from config objects, HTTPS dev-cert wiring, Docker guards, GitHub-source resources and npm app discovery.

๐Ÿ“– Documentation: English ยท Deutsch

Installation

dotnet add package Nextended.Aspire

Add it to your AppHost project. The other Nextended.Aspire.Hosting.* packages build on it.

The idea

An AppHost accumulates conditionals. A resource only exists in local development, a reference is only wired when a feature flag is on, a queue is only awaited in CI. Written straight, that turns Program.cs into a staircase of if blocks with a duplicated builder chain in each branch.

Every extension here is the conditional form of an existing Aspire call: it applies the step when the condition holds and returns the builder untouched when it does not, so the chain stays one chain.

Feature map

Area API
Conditional references WithReferenceIf, WithReferencesIf โ€” overloads for connection-string resources, service-discovery resources, EndpointReference and (name, Uri?)
Conditional waiting WaitForIf, WaitForCompletionIf, WaitForIfResourceWithParent, WaitForCompletionIfResourceWithParent
Conditional lifecycle WithExplicitStartIf, WithActionIf
Typed environment WithEnvironments<T, TObject>(options[, prefix]), WithEnvironmentsIf, WithEnvironment(keyExpression, value)
Endpoints WithEndpointAsEnvironment, WithEndpointAsEnvironmentIf, WithEndpointsAsEnvironmentIf, WithEndpointList, GetFirstExistingEndpoint
Project naming AddWithAutoNaming<TProject>()
HTTPS RunWithHttpsDevCertificate
Docker guards IsDockerInstalled, IsDockerRunning, StartDocker, EnsureDockerIsRunning, EnsureDockerRunning, EnsureDockerRunningIf, EnsureDockerRunningIfLocalDebug
GitHub sources AddGithubRepository, WithGithubSource, EnsureGitCheckout
npm AddAllNpmAppsInPath
Deployment domains BuildDomainName, BuildDomainNames, BuildDeploymentDomain, BuildDeploymentDomains, BuildDeploymentDomainList

Quick start

One chain instead of a staircase

var builder = DistributedApplication.CreateBuilder(args);

var isLocal = builder.Environment.IsDevelopment();
var cache   = isLocal ? builder.AddRedis("cache") : null;

var api = builder.AddProject<Projects.Api>("api")
    // Null dependency? The call is a no-op โ€” no if, no duplicated chain.
    .WithReferenceIf(cache)
    .WithReferenceIf("legacy", legacyUri)          // skipped when legacyUri is null
    .WaitForIf(isLocal, database)
    .WithExplicitStartIf(!isLocal);                // in production, start it manually

WithReferenceIf(dependency) overloads accept a nullable builder, so "the resource may not exist at all" is expressible without a null check at the call site.

Configuration objects instead of environment-variable strings

record SmtpOptions(string Host, int Port, bool UseTls);

api.WithEnvironments(new SmtpOptions("localhost", 1025, false));

The object is flattened with __ separators and prefixed with the type name, producing SmtpOptions__Host, SmtpOptions__Port, SmtpOptions__UseTls โ€” exactly the shape IConfiguration binding expects, so the consuming service reads it back with Configuration.GetSection("SmtpOptions").Get<SmtpOptions>(). Nested objects keep flattening, so a whole options tree travels in one call.

Pass your own prefix when the section name differs, or use WithEnvironmentsIf to skip the whole block when the options object is null:

api.WithEnvironments(smtpOptions, "Mail")     // Mail__Host, Mail__Port, โ€ฆ
   .WithEnvironmentsIf(featureOptions);       // no-op when featureOptions is null

There is also a refactor-safe single-value form that derives the variable name from the expression:

api.WithEnvironment<Projects.Api, SmtpOptions>(o => o.Host, "smtp.internal");

Project names you do not have to repeat

// Resource name and launch profile are derived from the project type,
// PascalCase split into a dash-separated, Aspire-legal resource name.
var api = builder.AddWithAutoNaming<Projects.My_Api_Service>();

Do not fail with a container error when Docker simply is not running

// Check up front and start the daemon rather than failing on the first container pull.
builder.Build()
    .EnsureDockerRunningIfLocalDebug()
    .Run();

IsDockerInstalled() and IsDockerRunning() are available for your own branching, and StartDocker() launches the daemon on Windows.

HTTPS dev certificate inside a container

var app = builder.AddContainer("frontend", "my/frontend")
    .RunWithHttpsDevCertificate();

The ASP.NET Core dev certificate is exported and mounted, so a containerised resource can serve HTTPS in local development without a manual certificate dance.

Resources straight from a Git repository

var tool = builder.AddGithubRepository("docs", "https://github.com/fgilde/Nextended");

EnsureGitCheckout clones or updates the working copy first, so the resource has its sources before it builds.

Every npm app in a folder

// One NodeAppResource per package.json found beneath the path.
var frontends = builder.AddAllNpmAppsInPath("../frontends");

The Aspire hosting integrations

Ready-made resources built on this package, each with a runnable AppHost sample:

Package Adds
Supabase Postgres, Auth, REST, Realtime, Storage, Studio, Kong, Edge Functions
n8n Workflow automation with Postgres persistence and a typed trigger client
Grafana Grafana, Prometheus, Loki, Tempo, Promtail, cAdvisor, OTel Collector
WebDataStudio Browser database studio wired to your databases
AspireUI The visual AppHost builder as a resource
LocalAI Self-hosted multimodal AI: images, speech, video
Php PHP endpoints as first-class Aspire resources

Supported frameworks

  • net8.0
  • net9.0
  • net10.0

Dependencies

The Nextended family

The other 17 packages in the suite:

Core libraries

  • Nextended.Core โ€” Foundation library โ€” extension methods, custom types (Money, Date, BaseId, SuperType), class mapping, deep clone, encryption, hashing and the code-generation attributes.
  • Nextended.Cache โ€” Expression-based caching โ€” automatic cache keys from method expressions, CacheProvider with condition-based invalidation, thread-safe AddOrGetExisting.

Data access

  • Nextended.EF โ€” Entity Framework Core extensions โ€” graph loading (LoadGraphAsync, IncludeAll, MultiInclude), declarative include definitions, paging, dynamic sorting and bulk operations.

ASP.NET Core & web

  • Nextended.Web โ€” ASP.NET Core utilities โ€” zero-config OData (AddODataAuto), composable IQueryable OData appliers, strongly typed controller URLs, streaming download helpers and a background executor that can replay a captured request.
  • Nextended.ResponseFilters โ€” Fluent, provider-agnostic pipeline that redacts, masks, rounds, truncates, hashes, prunes and restructures response DTOs before serialization โ€” per request, per user, per permission.
  • Nextended.ResponseFilters.AspNetCore โ€” ASP.NET Core adapter for Nextended.ResponseFilters โ€” registers the pipeline as a global IAsyncResultFilter and replays structural edits against the serialized JSON tree.

UI libraries

  • Nextended.Blazor โ€” Blazor helpers โ€” IBrowserFile extensions (bytes, data URLs, downloads), a hierarchical model for browsing inside uploaded zip/tar/rar archives, MIME-type detection and component-parameter reflection.
  • Nextended.UI โ€” WPF and Windows desktop helpers โ€” a global input-binding manager with hold/sequence matching, DirectInput and XInput gamepad readers, key-bind capture controls, converters, behaviours, markup extensions and runtime-defined PropertyGrid types.

Code generation & tooling

  • Nextended.Imaging โ€” Image processing โ€” aspect-preserving resize, crop, colour replacement, brightness-based foreground picking, thumbnail generation, byte/data-URL conversion and MIME detection from magic bytes.
  • Nextended.CodeGen โ€” Roslyn source generator โ€” DTOs and interfaces from your entities, strongly typed classes from JSON/XML, lookup tables from Excel, and documentation from source files.

.NET Aspire hosting

  • Nextended.Aspire โ€” Conditional AppHost builder extensions โ€” WithReferenceIf / WaitForIf / WithExplicitStartIf, strongly typed environment variables from config objects, HTTPS dev-cert wiring, Docker guards, GitHub-source resources and npm app discovery. (this package)
  • Nextended.Aspire.Hosting.Supabase โ€” The complete Supabase stack โ€” Postgres, Auth (GoTrue), REST, Realtime, Storage, Studio, Kong and Edge Functions โ€” as one composable Aspire resource.
  • Nextended.Aspire.Hosting.N8n โ€” The n8n workflow-automation platform as an Aspire resource, with Postgres persistence, workflow import and a typed client for triggering workflows from .NET.
  • Nextended.Aspire.Hosting.Grafana โ€” Grafana, Prometheus, Loki, Tempo, Promtail, cAdvisor, postgres_exporter and the OpenTelemetry Collector as composable resources with auto-provisioned datasources.
  • Nextended.Aspire.Hosting.WebDataStudio โ€” WebDataStudio โ€” a browser database studio for PostgreSQL, MySQL, SQL Server, SQLite, Oracle, DuckDB, ClickHouse, MongoDB and Redis โ€” wired to the databases of your stack, with accounts and roles, an optional SQL assistant, and an MCP endpoint for AI agents.
  • Nextended.Aspire.Hosting.AspireUI โ€” AspireUI โ€” the visual AppHost builder โ€” as a resource inside your own Aspire stack, with an optional pre-seeded admin user and a starter stack built from your project paths.
  • Nextended.Aspire.Hosting.LocalAI โ€” Self-hosted, OpenAI-compatible multimodal AI โ€” image generation, text-to-speech, speech-to-text and video โ€” with gallery model management, GPU support and Open WebUI.
  • Nextended.Aspire.Hosting.Php โ€” Run PHP endpoints inside your Aspire stack โ€” a docroot folder or a single router script served by PHP's built-in web server, with php.ini settings as fluent options.

License

GPL-3.0-or-later โ€” see LICENSE.

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 (3)

Showing the top 3 NuGet packages that depend on Nextended.Aspire:

Package Downloads
Nextended.Aspire.Hosting.Supabase

This Library provides an Aspire Supabase solution

Nextended.Aspire.Hosting.N8n

This Library provides an Aspire n8n workflow automation solution

Nextended.Aspire.Hosting.LocalAI

Self-hosted, OpenAI-compatible multimodal AI for .NET Aspire โ€” a LocalAI-based container resource for image generation, text-to-speech, speech-to-text and video generation, with gallery model management, GPU support and Open WebUI. The self-hosted counterpart of AddOllama for everything beyond text.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.34 0 8/27/2026
10.1.33 111 8/24/2026
10.1.32 201 8/20/2026
10.1.31 138 8/19/2026
10.1.30 131 8/19/2026
10.1.21 184 7/30/2026
10.1.20 180 7/26/2026
10.1.19 153 7/23/2026
10.1.18 329 7/22/2026
10.1.17 191 7/21/2026
10.1.16 164 7/21/2026
10.1.15 168 7/21/2026
10.1.14 156 7/16/2026
10.1.13 143 7/12/2026
10.1.12 142 7/12/2026
10.1.11 148 7/6/2026
10.1.10 162 6/16/2026
10.1.9 133 5/29/2026
10.1.8 130 5/19/2026
10.1.7 136 5/16/2026
Loading failed