Aspire.Hosting.Azure.Functions
13.3.0
Prefix Reserved
dotnet add package Aspire.Hosting.Azure.Functions --version 13.3.0
NuGet\Install-Package Aspire.Hosting.Azure.Functions -Version 13.3.0
<PackageReference Include="Aspire.Hosting.Azure.Functions" Version="13.3.0" />
<PackageVersion Include="Aspire.Hosting.Azure.Functions" Version="13.3.0" />
<PackageReference Include="Aspire.Hosting.Azure.Functions" />
paket add Aspire.Hosting.Azure.Functions --version 13.3.0
#r "nuget: Aspire.Hosting.Azure.Functions, 13.3.0"
#:package Aspire.Hosting.Azure.Functions@13.3.0
#addin nuget:?package=Aspire.Hosting.Azure.Functions&version=13.3.0
#tool nuget:?package=Aspire.Hosting.Azure.Functions&version=13.3.0
Aspire.Hosting.Azure.Functions library
Provides methods to the Aspire hosting model for Azure functions.
Getting started
Prerequisites
- An Aspire project based on the starter template.
- A .NET-based Azure Functions worker project.
Install the package
In your AppHost project, install the Aspire Azure Functions Hosting library with NuGet:
dotnet add package Aspire.Hosting.Azure.Functions
Usage example
Add a reference to the .NET-based Azure Functions project in your AppHost project.
dotnet add reference ..\Company.FunctionApp\Company.FunctionApp.csproj
In the AppHost.cs file of AppHost, use the AddAzureFunctionsProject to configure the Functions project resource.
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();
Durable Task Scheduler (Durable Functions)
The Azure Functions hosting library also provides resource APIs for using the Durable Task Scheduler (DTS) with Durable Functions.
In the AppHost.cs file of AppHost, add a Scheduler resource, create one or more Task Hubs, and pass the connection string and hub name to your Functions project:
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://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.3.0)
- Aspire.Hosting.Azure.Storage (>= 13.3.0)
- 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.53.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.Resources (>= 1.11.2)
- Azure.Security.KeyVault.Secrets (>= 4.8.0)
- Azure.Storage.Blobs (>= 12.26.0)
- Azure.Storage.Files.DataLake (>= 12.23.0)
- Azure.Storage.Queues (>= 12.24.0)
- Google.Protobuf (>= 3.33.5)
- Grpc.AspNetCore (>= 2.76.0)
- Grpc.Net.ClientFactory (>= 2.76.0)
- Grpc.Tools (>= 2.78.0)
- Humanizer.Core (>= 2.14.1)
- JsonPatch.Net (>= 3.3.0)
- KubernetesClient (>= 18.0.13)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.7)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.26)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.7)
- Microsoft.Extensions.Hosting (>= 10.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Http (>= 10.0.7)
- Microsoft.Extensions.Logging (>= 10.0.7)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.7)
- Microsoft.Extensions.Options (>= 10.0.7)
- Microsoft.Extensions.Primitives (>= 10.0.7)
- ModelContextProtocol (>= 1.0.0)
- Newtonsoft.Json (>= 13.0.4)
- Polly.Core (>= 8.6.5)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.22.23)
- System.IO.Hashing (>= 10.0.3)
- System.Text.Json (>= 10.0.7)
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
|
|
|
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.3.0 | 1,588 | 5/7/2026 | |
| 13.2.4 | 21,542 | 4/24/2026 | |
| 13.2.3 | 10,385 | 4/21/2026 | |
| 13.2.2 | 29,200 | 4/8/2026 | |
| 13.2.1 | 16,933 | 3/31/2026 | |
| 13.2.0 | 27,082 | 3/23/2026 | |
| 13.1.3 | 9,610 | 3/19/2026 | |
| 13.1.2 | 72,239 | 2/26/2026 | |
| 13.1.1 | 46,896 | 2/11/2026 | |
| 13.1.0 | 149,064 | 12/17/2025 | |
| 13.0.2-preview.1.25603.5 | 17,265 | 12/4/2025 | |
| 13.0.1-preview.1.25575.3 | 10,988 | 11/26/2025 | |
| 13.0.0-preview.1.25560.3 | 27,466 | 11/11/2025 | |
| 9.5.2-preview.1.25522.3 | 37,532 | 10/23/2025 | |
| 9.5.1-preview.1.25502.11 | 39,532 | 10/3/2025 | |
| 9.5.0-preview.1.25474.7 | 24,311 | 9/25/2025 | |
| 9.4.2-preview.1.25428.12 | 28,169 | 9/2/2025 | |
| 9.4.1-preview.1.25408.4 | 27,829 | 8/12/2025 | |
| 9.4.0-preview.1.25378.8 | 26,097 | 7/29/2025 | |
| 9.3.1-preview.1.25305.6 | 82,189 | 6/10/2025 |