Aspire.Hosting.Azure.Functions
13.5.1
Prefix Reserved
dotnet add package Aspire.Hosting.Azure.Functions --version 13.5.1
NuGet\Install-Package Aspire.Hosting.Azure.Functions -Version 13.5.1
<PackageReference Include="Aspire.Hosting.Azure.Functions" Version="13.5.1" />
<PackageVersion Include="Aspire.Hosting.Azure.Functions" Version="13.5.1" />
<PackageReference Include="Aspire.Hosting.Azure.Functions" />
paket add Aspire.Hosting.Azure.Functions --version 13.5.1
#r "nuget: Aspire.Hosting.Azure.Functions, 13.5.1"
#:package Aspire.Hosting.Azure.Functions@13.5.1
#addin nuget:?package=Aspire.Hosting.Azure.Functions&version=13.5.1
#tool nuget:?package=Aspire.Hosting.Azure.Functions&version=13.5.1
Azure Functions hosting integration
Use this integration to model, configure, and orchestrate Azure Functions projects in an Aspire solution.
Getting started
Prerequisites
- An Aspire project based on the starter template.
- An Azure Functions app project.
Add the integration
From your AppHost directory, add the Aspire.Hosting.Azure.Functions integration with the Aspire CLI:
aspire add Aspire.Hosting.Azure.Functions
Usage example
In the AppHost, use AddAzureFunctionsProject to configure the Functions app resource. C# AppHosts use the generated project metadata type; TypeScript AppHosts point at the Functions app directory.
C#
using Aspire.Hosting;
using Aspire.Hosting.Azure;
using Aspire.Hosting.Azure.Functions;
var builder = new DistributedApplicationBuilder();
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var queue = storage.AddQueues("queue");
var blob = storage.AddBlobs("blob");
builder.AddAzureFunctionsProject<Projects.Company_FunctionApp>("my-functions-project")
.WithReference(queue)
.WithReference(blob);
var app = builder.Build();
app.Run();
TypeScript
import { createBuilder } from "./.aspire/modules/aspire.mjs";
const builder = await createBuilder();
const storage = await builder.addAzureStorage("storage").runAsEmulator();
const queue = await storage.addQueues("queue");
const blob = await storage.addBlobs("blob");
await builder.addAzureFunctionsProject("my-functions-project", "../Company.FunctionApp")
.withReference(queue)
.withReference(blob);
await builder.build().run();
Durable Task Scheduler (Durable Functions)
The Azure Functions hosting integration also provides resource APIs for using the Durable Task Scheduler (DTS) with Durable Functions.
In the AppHost, add a Scheduler resource, create one or more Task Hubs, and pass the connection string and hub name to your Functions app resource:
using Aspire.Hosting;
using Aspire.Hosting.Azure;
using Aspire.Hosting.Azure.Functions;
var builder = DistributedApplication.CreateBuilder(args);
var storage = builder.AddAzureStorage("storage").RunAsEmulator();
var scheduler = builder.AddDurableTaskScheduler("scheduler")
.RunAsEmulator();
var taskHub = scheduler.AddTaskHub("taskhub");
builder.AddAzureFunctionsProject<Projects.Company_FunctionApp>("funcapp")
.WithHostStorage(storage)
.WithReference(taskHub);
builder.Build().Run();
Use the DTS emulator
RunAsEmulator() starts a local container running the Durable Task Scheduler emulator.
When a Scheduler runs as an emulator, Aspire automatically provides:
- A "Scheduler Dashboard" URL for the scheduler resource.
- A "Task Hub Dashboard" URL for each Task Hub resource.
- A
DTS_TASK_HUB_NAMESenvironment variable on the emulator container listing the Task Hub names associated with that scheduler.
Use an existing Scheduler
If you already have a Scheduler instance, configure the resource using its connection string:
var schedulerConnectionString = builder.AddParameter(
"dts-connection-string",
"Endpoint=https://existing-scheduler.durabletask.io;Authentication=DefaultAzure");
var scheduler = builder.AddDurableTaskScheduler("scheduler")
.RunAsExisting(schedulerConnectionString);
var taskHubName = builder.AddParameter("taskhub-name", "mytaskhub");
var taskHub = scheduler.AddTaskHub("taskhub").WithTaskHubName(taskHubName);
Additional documentation
- https://aspire.dev/integrations/gallery/
- https://aspire.dev/integrations/cloud/azure/azure-functions/azure-functions-host/
- https://learn.microsoft.com/azure/azure-functions
- https://learn.microsoft.com/azure/azure-functions/durable/durable-task-scheduler/durable-task-scheduler
Feedback & contributing
| Product | Versions 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. |
-
net8.0
- Aspire.Hosting.Azure (>= 13.5.1)
- Aspire.Hosting.Azure.Storage (>= 13.5.1)
- AspNetCore.HealthChecks.Azure.Storage.Blobs (>= 9.0.0)
- AspNetCore.HealthChecks.Azure.Storage.Queues (>= 9.0.0)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Azure.Core (>= 1.57.0)
- Azure.Identity (>= 1.21.0)
- Azure.Provisioning (>= 1.5.0)
- Azure.Provisioning.KeyVault (>= 1.1.0)
- Azure.Provisioning.Storage (>= 1.1.2)
- Azure.ResourceManager.Authorization (>= 1.1.6)
- Azure.ResourceManager.KeyVault (>= 1.4.0)
- Azure.ResourceManager.Resources (>= 1.11.2)
- Azure.Security.KeyVault.Secrets (>= 4.11.0)
- Azure.Storage.Blobs (>= 12.28.0)
- Azure.Storage.Files.DataLake (>= 12.26.0)
- Azure.Storage.Queues (>= 12.26.0)
- Google.Protobuf (>= 3.34.1)
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Net.ClientFactory (>= 2.80.0)
- Grpc.Tools (>= 2.80.0)
- Humanizer.Core (>= 3.0.10)
- JsonPatch.Net (>= 5.0.2)
- KubernetesClient (>= 19.0.2)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.11)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.30)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.11)
- Microsoft.Extensions.Hosting (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Primitives (>= 10.0.11)
- ModelContextProtocol (>= 1.3.0)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.15.3)
- OpenTelemetry.Extensions.Hosting (>= 1.15.3)
- Polly.Core (>= 8.6.6)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.8)
- System.Text.Json (>= 10.0.11)
- YamlDotNet (>= 16.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (4)
Showing the top 4 popular GitHub repositories that depend on Aspire.Hosting.Azure.Functions:
| Repository | Stars |
|---|---|
|
microsoft/aspire-samples
Browse the sample apps demonstrating Aspire integration across C#, JavaScript, TypeScript, Python, Go, containers, databases, cloud, AI, and observability scenarios.
|
|
|
microsoft/AzUrlShortener
An simple and easy Url Shortener
|
|
|
J-Tech-Japan/Sekiban
Sekiban - an Opinionated Event Sourcing and CQRS Framework using C#. It can store data into Azure Cosmos DB, AWS Dynamo DB or Postgres
|
|
|
Azure-Samples/eShopLite
eShopLite is a set of reference .NET applications implementing an eCommerce site with features like Semantic Search, MCP, Reasoning models and more.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 13.5.1 | 107 | 8/20/2026 |
| 13.5.0 | 2,586 | 8/18/2026 |
| 13.4.6 | 181,841 | 6/19/2026 |
| 13.4.5 | 20,969 | 6/17/2026 |
| 13.4.4 | 11,291 | 6/15/2026 |
| 13.4.3 | 42,680 | 6/8/2026 |
| 13.4.2 | 17,340 | 6/3/2026 |
| 13.4.1 | 1,160 | 6/3/2026 |
| 13.4.0 | 7,853 | 6/1/2026 |
| 13.3.5 | 55,124 | 5/21/2026 |
| 13.3.4 | 15,792 | 5/19/2026 |
| 13.3.3 | 22,055 | 5/15/2026 |
| 13.3.2 | 9,054 | 5/14/2026 |
| 13.3.1 | 9,226 | 5/12/2026 |
| 13.3.0 | 15,587 | 5/7/2026 |
| 13.2.4 | 55,271 | 4/24/2026 |
| 13.2.3 | 18,092 | 4/21/2026 |
| 13.2.2 | 47,957 | 4/8/2026 |
| 13.2.1 | 31,018 | 3/31/2026 |
| 13.2.0 | 38,414 | 3/23/2026 |