AspireC4.Hosting 13.3.2

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

AspireC4.Hosting

AspireC4.Hosting is an Aspire extension library that generates live LikeC4 diagrams from the Aspire resource graph.

Prerequisites

  • Docker is used by default to run the LikeC4 sidecar container.
  • Optional: a local Node.js CLI runtime (npx, pnpm, yarn, bun, or deno) if you call .WithLocalCLI().

Quick start

var builder = DistributedApplication.CreateBuilder(args);

builder.AddAspireC4();

builder.Build().Run();

This writes ./likec4/gen/model.gen.c4, starts the LikeC4 server, and refreshes the diagram as the Aspire app changes.

Configuration

Configure the diagram through AspireC4DiagramOptions:

Property Default Description
Title null Title shown in the LikeC4 app
ViewTitle "Architecture" Title shown in the generated view
ViewDescription null Optional view description
OutputDirectory "./likec4/gen/" Directory where the generated .c4 file is written
FileName "model.gen" Generated file name without extension
DisableHMR false Disable Hot Module Replacement
HMRPort 24678 HMR port used by the LikeC4 server and browser
ContainerImageTag null (latest) Pin the ghcr.io/likec4/likec4 image tag
AutoIconsEnabled true Infer LikeC4 icons from resource type and name
HideFromDashboard false Hide the LikeC4 sidecar from the Aspire dashboard
DashboardLinkDisplayName "Architecture Diagram" Name used for the diagram link when hidden from the dashboard
IncludeAspireDashboardLinks true Add Aspire dashboard links to diagram elements

Common options

Local CLI

builder.AddAspireC4().WithLocalCLI();

Hide from the dashboard

builder.AddAspireC4().WithHideFromDashboard();

Disable HMR

builder.AddAspireC4(options => options.WithHMRDisabled());

Exclude the sidecar from the diagram

The LikeC4 sidecar is excluded automatically. Use WithIncludeAspireC4InternalResource(true) if you want to inspect it.

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 was computed.  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
13.3.2 170 6/11/2026
13.3.1 103 6/4/2026
13.3.0-prerelease.10 68 5/24/2026
13.3.0-prerelease.9 59 5/20/2026
13.3.0-prerelease.8 56 5/18/2026
13.3.0-prerelease.7 59 5/17/2026
13.3.0-prerelease.6 61 5/15/2026
13.3.0-prerelease.3 57 5/13/2026
13.3.0-prerelease.2 61 5/13/2026
13.3.0-prerelease.1 56 5/12/2026