InfinityFlow.Aspire.Temporal 1.0.2

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

InfinityFlow.Aspire.Temporal

NuGet

Discord

Aspire extension to start the Temporal CLI dev server as a container or executable resource, with an optional client library for automatic connection string resolution and OpenTelemetry integration.

Note: Only container works as expected. See https://github.com/dotnet/aspire/issues/1637 and https://github.com/temporalio/cli/issues/316

Contents:

Pre-requisites

Getting Started

1. Install the NuGet packages

# Hosting library (AppHost project)
dotnet add package InfinityFlow.Aspire.Temporal

# Client library (Worker/API projects)
dotnet add package InfinityFlow.Aspire.Temporal.Client

2. Add Temporal dev server to your Aspire AppHost

// AppHost/Program.cs
using InfinityFlow.Aspire.Temporal;

var builder = DistributedApplication.CreateBuilder(args);

// Container resource (recommended)
var temporal = builder.AddTemporalServerContainer("temporal")
    .WithLogFormat(LogFormat.Json)
    .WithLogLevel(LogLevel.Info)
    .WithNamespace("test1", "test2")
    .WithDynamicConfigValue("frontend.enableUpdateWorkflowExecution", true);

// With fixed ports (dynamic by default)
var temporalWithPorts = builder.AddTemporalServerContainer("temporalWithPorts")
    .WithServicePort(7233)
    .WithUiPort(8233);

// Reference from your projects
builder.AddProject<Projects.Worker>("worker")
    .WithReference(temporal);

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

builder.Build().Run();

3. Run the Aspire application

You should see Temporal running under the Containers tab.

Aspire dashboard temporal exe

Client Library

The InfinityFlow.Aspire.Temporal.Client package provides automatic connection string resolution, OpenTelemetry integration, and health checks.

Register a worker

// Worker/Program.cs
using InfinityFlow.Aspire.Temporal.Client;

var builder = Host.CreateApplicationBuilder(args);

builder.AddTemporalWorker("temporal", "my-task-queue", opts =>
{
    opts.Namespace = "my-namespace";
})
.AddWorkflow<MyWorkflow>()
.AddScopedActivities<MyActivities>();

builder.Build().Run();

Register a client

// Api/Program.cs
using InfinityFlow.Aspire.Temporal.Client;

var builder = WebApplication.CreateBuilder(args);

builder.AddTemporalClient("temporal", opts =>
{
    opts.Namespace = "my-namespace";
});

var app = builder.Build();
// ...

Both AddTemporalWorker and AddTemporalClient automatically:

  • Resolve the connection string from the Aspire resource reference
  • Register a TracingInterceptor for distributed tracing
  • Set up a TemporalRuntime with CustomMetricMeter for metrics
  • Add a health check for the Temporal connection

Observability

Service Defaults

Add AddTemporalServiceDefaults() in your service defaults to wire up OpenTelemetry meters and tracing sources:

// ServiceDefaults/Extensions.cs
using InfinityFlow.Aspire.Temporal.Client;

builder.Services.AddTemporalServiceDefaults();

This registers the Temporal meter and TracingInterceptor activity sources with the OpenTelemetry pipeline. See the sample for a complete example.

If done correctly, you should see tracing and metrics on the Aspire dashboard:

Tracing

aspire dashboard temporal tracing

Metrics

aspire dashboard temporal metrics

Configuration

The dev server is configured with fluent extension methods:

builder.AddTemporalServerContainer("temporal")
    .WithDbFileName("/location/of/persistent/file") // --db-filename
    .WithNamespace("namespace-name")                 // --namespace
    .WithServicePort(7233)                           // external host port (container internal is always 7233)
    .WithHttpPort()                                  // --http-port
    .WithMetricsEndpoint()                           // --metrics-port
    .WithUiPort(8233)                                // external host port (container internal is always 8233)
    .WithHeadlessUi()                                // --headless
    .WithIp("127.0.0.1")                             // --ip
    .WithUiIp("127.0.0.1")                           // --ui-ip
    .WithUiAssetPath("/location/of/custom/assets")   // --ui-asset-path
    .WithUiCodecEndpoint("http://localhost:8080")     // --ui-codec-endpoint
    .WithLogFormat(LogFormat.Pretty)                  // --log-format
    .WithLogLevel(LogLevel.Info)                      // --log-level
    .WithSQLitePragma(SQLitePragma.JournalMode)       // --sqlite-pragma
    .WithDynamicConfigValue("key", value)             // --dynamic-config-value
    .WithLogConfig(true)                               // --log-config
    .WithSearchAttribute("MyKey", SearchAttributeType.Keyword) // --search-attribute
    .WithUiPublicPath("/temporal");                    // --ui-public-path

You can run temporal server start-dev --help to get more information about the CLI flags on the dev server.

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
1.0.2 381 3/8/2026
1.0.1 78 3/7/2026
1.0.0 732 3/7/2026
0.8.1 286,676 11/23/2025
0.8.0 8,172 9/26/2025
0.7.0 168,090 8/17/2025
0.6.2 211,089 3/12/2025
0.6.1 594 3/8/2025
0.6.0 3,966 2/27/2025
0.5.14 1,621 2/27/2025
0.5.12 28,439 10/8/2024
0.5.11 7,659 9/4/2024
0.5.10 203 8/28/2024
0.5.9 431 8/10/2024
0.5.8 756 5/22/2024
0.5.7 201 5/15/2024
0.5.6 149 5/14/2024
0.5.5 143 5/13/2024
0.5.4 203 5/9/2024
0.5.3 334 4/24/2024
Loading failed