Nabs.Launchpad.Core.Aspire.Hosting 10.0.273

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

Nabs.Launchpad.Core.Aspire.Hosting

Purpose

This package provides Aspire hosting extensions for Nabs Launchpad applications, including environment-aware App Configuration and Key Vault resources with secure, predictable conventions.

Installation

Install the package from NuGet:

dotnet add package Nabs.Launchpad.Core.Aspire.Hosting

Quick Start

using Aspire.Hosting;
using Nabs.Launchpad.Core.Aspire.Hosting;

var builder = DistributedApplication.CreateBuilder(args);

var config = builder.AddNabsConfigurationResources();

builder.AddProject<Projects.Api>("api")
    .WithReference(config.AppConfiguration)
    .WithReference(config.KeyVault);

builder.Build().Run();

API Overview

  • AddNabsConfigurationResources(...) – adds Azure App Configuration and Key Vault resources with the correct behaviour for Local, Ephemeral, and Production environments.
  • AddNabsSecretParameter(...) – adds an Aspire secret parameter with consistent naming.
  • WithNabsSecretEnvironment<T>(...) – injects a secret parameter as a normalised environment variable.
  • WithNabsLocalGatewayIdentity<T>(...) – optionally wires a local Azure identity emulator for gateway OIDC flows in run mode.
  • AddNabsPlaywrightHarnessResources<TReportHostProject>(...) – adds Playwright report host, UI, and recorder resources with gateway dependencies.
  • AddThirdPartyService<TProject>(...) – registers a third-party service that resolves to an external URL by default and can switch to a local emulator project via RunAsEmulator() in run mode.
  • GetPlaywrightBaseUrlsToTest() – provides the default comma-separated base URLs for Playwright test execution.
  • NabsConfigurationHostingOptions – customisable resource/parameter names and environment handling.
  • NabsConfigurationResources – strongly typed wrapper for the App Configuration and Key Vault resource builders.

Playwright harness resources

using Nabs.Launchpad.Core.Aspire.Hosting;

var gatewayService = builder.AddProject<Projects.Gateway>("gateway-service", "http");

builder.AddNabsPlaywrightHarnessResources<Projects.PlaywrightReportHost>(
    gatewayService,
    launchProfileName: "http",
    playwrightBaseUrls: PlaywrightHostingExtensions.GetPlaywrightBaseUrlsToTest());

This centralizes:

  • playwright-report-host project resource
  • playwright-ui executable resource
  • playwright-record-http executable resource (explicit start)
  • playwright-record-https executable resource (explicit start)

Environment behaviour

Third-party service registration

using Nabs.Launchpad.Core.Aspire.Hosting;

var peopleService = builder
    .AddThirdPartyService<Projects.Launchpad_Harness_ThirdPartyService>("people-third-party-service", "https://api.people.example.com")
    .RunAsEmulator();

builder.AddProject<Projects.Api>("api")
    .WithReference(peopleService)
    .WaitFor(peopleService);

Behavior:

  • Run mode: RunAsEmulator() uses the local project resource.
  • Publish/Deploy modes: the configured external URL is used.
Environment Trigger App Configuration Key Vault / Secrets
Local ExecutionContext.IsRunMode Official emulator (.RunAsEmulator()) Aspire Parameters + user-secrets. Optional community Key Vault emulator.
Ephemeral Publish/Deploy + environment name ≠ Production Provision new resource Provision new Key Vault
Production Publish/Deploy + Environment.IsEnvironment("Production") .AsExisting(...) against shared landing-zone resource .AsExisting(...) against shared landing-zone Key Vault

Production pipeline variables

Supply these parameters when deploying to Production so Aspire references the existing shared resources instead of provisioning new ones:

Parameters__appConfigName=prod-shared-appconfig
Parameters__appConfigResourceGroup=rg-landingzone-prod
Parameters__keyVaultName=prod-shared-kv
Parameters__keyVaultResourceGroup=rg-landingzone-prod

Conventions

Convention Default
App Configuration resource/connection name appconfig
Key Vault resource/connection name keyvault
Production App Config name parameter appConfigName
Production App Config resource group parameter appConfigResourceGroup
Production Key Vault name parameter keyVaultName
Production Key Vault resource group parameter keyVaultResourceGroup

Secret parameters

var apiKey = builder.AddNabsSecretParameter("ApiKey");

builder.AddProject<Projects.Api>("api")
    .WithNabsSecretEnvironment("Api:Key", apiKey);

This injects the value as Api__Key in the target resource environment.

You can also align parameter naming with a hierarchical configuration key:

var authKey = builder.AddNabsSecretParameter("AuthKey", "Auth:Key");

When configurationKey is provided, the parameter is normalised using :__ conventions.

Optional local gateway identity emulation

var gateway = builder.AddProject<Projects.Gateway>("gateway");
gateway = builder.WithNabsLocalGatewayIdentity(gateway);

Enable this behavior in local profiles with NABS_USE_LOCAL_AZURE_IDENTITY_EMULATOR=true.

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
10.0.273 56 9/6/2026
10.0.272 49 9/5/2026
10.0.270 53 9/5/2026
10.0.269 46 9/5/2026
10.0.255 103 7/26/2026