Aspire.Hosting.Azure.Storage
13.5.2
Prefix Reserved
dotnet add package Aspire.Hosting.Azure.Storage --version 13.5.2
NuGet\Install-Package Aspire.Hosting.Azure.Storage -Version 13.5.2
<PackageReference Include="Aspire.Hosting.Azure.Storage" Version="13.5.2" />
<PackageVersion Include="Aspire.Hosting.Azure.Storage" Version="13.5.2" />
<PackageReference Include="Aspire.Hosting.Azure.Storage" />
paket add Aspire.Hosting.Azure.Storage --version 13.5.2
#r "nuget: Aspire.Hosting.Azure.Storage, 13.5.2"
#:package Aspire.Hosting.Azure.Storage@13.5.2
#addin nuget:?package=Aspire.Hosting.Azure.Storage&version=13.5.2
#tool nuget:?package=Aspire.Hosting.Azure.Storage&version=13.5.2
Azure Storage hosting integration
Use this integration to model, configure, and orchestrate Azure Storage in an Aspire solution.
Getting started
Prerequisites
- Azure subscription - create one for free
Add the integration
From your AppHost directory, add the Aspire.Hosting.Azure.Storage integration with the Aspire CLI:
aspire add Aspire.Hosting.Azure.Storage
Configure Azure Provisioning for local development
Adding Azure resources to the AppHost model will automatically enable development-time provisioning
for Azure resources so that you don't need to configure them manually. Provisioning requires a number of settings
to be available via AppHost configuration. From your AppHost directory, set these values with aspire secret set:
aspire secret set Azure:SubscriptionId "<your subscription id>"
aspire secret set Azure:ResourceGroupPrefix "<prefix for the resource group>"
aspire secret set Azure:Location "<azure location>"
NOTE: Developers must have Owner access to the target subscription so that role assignments can be configured for the provisioned resources.
Usage example
In the AppHost, add a Blob (can use tables or queues also) Storage connection and reference it from another resource with either C# or TypeScript:
C#
var blobs = builder.AddAzureStorage("storage").AddBlobs("blobs");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(blobs);
TypeScript
const blobs = await builder.addAzureStorage("storage").addBlobs("blobs");
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.withReference(blobs);
Creating and using blob containers and queues directly
You can create and use blob containers and queues directly by adding them to your storage resource. This allows you to provision and reference specific containers or queues for your services.
Adding a blob container
var storage = builder.AddAzureStorage("storage");
var container = storage.AddBlobContainer("my-container");
The container reference can be passed to another resource:
builder.AddProject<Projects.MyService>()
.WithReference(container);
Adding a queue
var storage = builder.AddAzureStorage("storage");
var queue = storage.AddQueue("my-queue");
The queue reference can be passed to another resource:
builder.AddProject<Projects.MyService>()
.WithReference(queue);
This approach allows you to define and reference specific blob containers and queues as first-class resources in your AppHost model.
Creating and using data lake
var storage = builder.AddAzureStorage("azure-storage");
var dataLake = storage.AddDataLake("data-lake");
var fileSystem = storage.AddDataLakeFileSystem("data-lake-file-system");
The references can be passed to a project:
api.WithReference(dataLake).WithReference(fileSystem);
Connection Properties
When you reference Azure Storage resources using WithReference, the following connection properties are made available to the consuming project:
Azure Storage
The Azure Storage account resource doesn't expose any connection property, reference sub-resources:
Blob Storage
The Blob Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the blob storage service, with the format https://mystorageaccount.blob.core.windows.net/ |
ConnectionString |
Emulator only. The connection string for the blob storage service |
Blob Container
The Blob Container resource inherits all properties from its parent AzureBlobStorageResource and adds:
| Property Name | Description |
|---|---|
BlobContainerName |
The name of the blob container |
Data Lake Storage
The Data Lake Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the data lake storage service, with the format https://mystorageaccount.dfs.core.windows.net/ |
Emulator currently does not support data lake storage.
Data Lake File System
The Data Lake FileSystem resource inherits all properties from its parent AzureDataLakeStorageResource and adds:
| Property Name | Description |
|---|---|
DataLakeFileSystemName |
The name of the data lake file system |
Emulator currently does not support data lake storage.
Queue Storage
The Queue Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the queue storage service, with the format https://mystorageaccount.queue.core.windows.net/ |
ConnectionString |
Emulator only. The connection string for the queue storage service |
Queue
The Queue resource inherits all properties from its parent AzureQueueStorageResource and adds:
| Property Name | Description |
|---|---|
QueueName |
The name of the queue |
ConnectionString |
Emulator only. The connection string for the queue storage service |
Table Storage
The Table Storage resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Uri |
The URI of the table storage service, with the format https://mystorageaccount.table.core.windows.net/ |
ConnectionString |
The connection string for the table storage service |
Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called queue1 becomes QUEUE1_URI.
Additional documentation
- https://aspire.dev/integrations/gallery/
- https://aspire.dev/integrations/cloud/azure/azure-storage-blobs/azure-storage-blobs-host/
- https://aspire.dev/integrations/cloud/azure/azure-storage-queues/azure-storage-queues-host/
- https://aspire.dev/integrations/cloud/azure/azure-storage-tables/azure-storage-tables-host/
- https://learn.microsoft.com/azure/storage/common/storage-introduction
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.2)
- 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 (10)
Showing the top 5 NuGet packages that depend on Aspire.Hosting.Azure.Storage:
| Package | Downloads |
|---|---|
|
Aspire.Hosting.Azure.Functions
Azure Functions resource types for Aspire. |
|
|
Aspire.Hosting.Azure.Sql
Azure SQL Database resource types for Aspire. |
|
|
Aspire.Hosting.Azure.EventHubs
Azure Event Hubs resource types for Aspire. |
|
|
Aspire.Hosting.Foundry
Microsoft Foundry resource types for Aspire. |
|
|
EAVFramework.Extensions.Aspire.Hosting
Aspire Hosting package for EAVFramework |
GitHub repositories (15)
Showing the top 15 popular GitHub repositories that depend on Aspire.Hosting.Azure.Storage:
| Repository | Stars |
|---|---|
|
dotnet/samples
Sample code referenced by the .NET documentation
|
|
|
exceptionless/Exceptionless
Exceptionless application
|
|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
|
|
microsoft/aspire-samples
Browse the sample apps demonstrating Aspire integration across C#, JavaScript, TypeScript, Python, Go, containers, databases, cloud, AI, and observability scenarios.
|
|
|
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
|
|
|
microsoft/AzUrlShortener
An simple and easy Url Shortener
|
|
|
petabridge/akkadotnet-code-samples
Akka.NET professional reference code samples
|
|
|
platformplatform/PlatformPlatform
A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
|
|
|
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
|
|
|
petrsvihlik/WopiHost
The most advanced .NET implementation of the WOPI protocol. Enables integration with WOPI clients such as Office Online Server.
|
|
|
marinasundstrom/YourBrand
Prototype enterprise system for e-commerce and consulting services
|
|
|
akkadotnet/Alpakka
Akka Streams Connectors - Alpakka
|
|
|
koralium/flowtide
High-performance streaming SQL query engine designed for real-time data processing. Use cases include event-driven architectures, ETL pipelines, and modern data-intensive applications.
|
|
|
PacktPublishing/Pragmatic-Microservices-with-CSharp-and-Azure
Pragmatic Microservices with C# and Azure, published by Packt
|
|
|
baotoq/micro-commerce
.NET 10 .NET Aspire
|
| Version | Downloads | Last Updated |
|---|---|---|
| 13.5.2 | 3,561 | 8/21/2026 |
| 13.5.1 | 5,048 | 8/20/2026 |
| 13.5.0 | 11,332 | 8/18/2026 |
| 13.4.6 | 651,769 | 6/19/2026 |
| 13.4.5 | 88,968 | 6/17/2026 |
| 13.4.4 | 51,198 | 6/15/2026 |
| 13.4.3 | 105,417 | 6/8/2026 |
| 13.4.2 | 118,080 | 6/3/2026 |
| 13.4.1 | 3,506 | 6/3/2026 |
| 13.4.0 | 57,664 | 6/1/2026 |
| 13.3.5 | 194,733 | 5/21/2026 |
| 13.3.4 | 47,659 | 5/19/2026 |
| 13.3.3 | 63,985 | 5/15/2026 |
| 13.3.2 | 36,928 | 5/14/2026 |
| 13.3.1 | 23,935 | 5/12/2026 |
| 13.3.0 | 83,897 | 5/7/2026 |
| 13.2.4 | 243,782 | 4/24/2026 |
| 13.2.3 | 66,404 | 4/21/2026 |
| 13.2.2 | 196,829 | 4/8/2026 |
| 13.2.1 | 100,166 | 3/31/2026 |