TemporalCommunity.Aspire.Hosting 0.4.0

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

TemporalCommunity.Aspire.Hosting

TemporalCommunity.Aspire.Hosting is a .NET Aspire hosting integration for running Temporal development server resources from an AppHost.

Install

dotnet add package TemporalCommunity.Aspire.Hosting

Usage

Add a Temporal resource to your AppHost and reference it from projects that need Temporal connection details.

var builder = DistributedApplication.CreateBuilder(args);

var temporal = builder.AddTemporalLocalDevServer();

builder.AddProject<Projects.Worker>("worker")
    .WithReference(temporal);

builder.Build().Run();

WithReference injects TEMPORAL_ADDRESS, TEMPORAL_UI_ADDRESS, and TEMPORAL_NAMESPACE into the referenced project. Codec settings are also injected when configured.

The package also includes AddTemporalDevContainer for Docker-based local development and AddTemporalCliServer for running the Temporal CLI dev server directly.

AddTemporalDevContainer requires Aspire 13.5.3 or later. Aspire allocates free host ports by default while Temporal keeps its standard internal ports: 7233 for gRPC, 8233 for the UI, and 9233 for metrics. Referenced projects receive the allocated addresses automatically.

Configure non-default values when fixed host ports are required:

var temporal = builder.AddTemporalDevContainer("temporal", options =>
{
    options.TargetHost = "0.0.0.0:7399";
    options.UIPort = 8399;
    options.MetricsPort = 9399;
});

Temporal Cloud

Use AddTemporalCloud for an externally managed Temporal Cloud namespace:

var temporalAddress = builder.AddParameter("temporal-address");
var temporalNamespace = builder.AddParameter("temporal-namespace");
var temporalApiKey = builder.AddParameter("temporal-api-key", secret: true);
var temporalUiAddress = builder.AddParameter("temporal-ui-address");

var temporal = builder.AddTemporalCloud(
    "temporal",
    temporalAddress,
    temporalNamespace,
    temporalApiKey,
    temporalUiAddress,
    configure: options => options.EnableHealthCheck = true);

builder.AddProject<Projects.Worker>("worker")
    .WithReference(temporal);

Use secret parameters for API keys and codec credentials. A UI address adds a Temporal Dashboard link in Aspire. WithReference supplies the Temporal connection environment variables to consuming projects, which can load them with ClientEnvConfig.LoadClientConnectOptions().

EnableHealthCheck verifies the endpoint, TLS, and credentials with GetSystemInfo; it does not verify worker or task-queue health.

Persist development state

Set Temporal's dev-server database filename to persist local development state:

Directory.CreateDirectory("../.temporal");

var temporal = builder.AddTemporalLocalDevServer("temporal", options =>
{
    options.DevServerOptions.DatabaseFilename = "../.temporal/temporal.db";
});

For AddTemporalDevContainer, use a container path and mount a volume:

var temporal = builder.AddTemporalDevContainer("temporal", options =>
{
    options.DevServerOptions.DatabaseFilename = "/home/temporal/temporal.db";
});

temporal.WithVolume("temporal-data", "/home/temporal");

DevServerOptions is marked unstable by the Temporal .NET SDK and may change in future SDK versions.

When UI = false, the resource does not publish a dashboard URL or TEMPORAL_UI_ADDRESS. Development resources expose /metrics; container host ports are allocated unless non-default ports are configured explicitly.

Resources

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

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.4.0 87 8/29/2026
0.2.0 143 8/2/2026
0.1.0 287 7/26/2026