Azure Functions resource types for .NET Aspire.
Deprecated Package Version
Reason: Other, Legacy
This version is out of support and is no longer maintained. Please upgrade to the latest version. See our support policy for details: https://aka.ms/dotent/aspire/support
Install
| Product | Versions |
|---|---|
| .NET |
README
Aspire.Hosting.Azure.Functions library (Preview)
Provides methods to the .NET Aspire hosting model for Azure functions.
Getting started
Prerequisites
- A .NET Aspire project based on the starter template.
- A .NET-based Azure Functions worker project.
Install the package
In your AppHost project, install the .NET Aspire Azure Functions Hosting library with NuGet:
dotnet add package Aspire.Hosting.Azure.Functions --prerelease
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 Program.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();
Feedback & contributing
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.