Aspire.Hosting.Azure.Redis 13.6.4

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

Azure Cache for Redis hosting integration

Use this integration to model, configure, and orchestrate Azure Managed Redis in an Aspire solution.

Note: The AddAzureRedis method is obsolete. Use AddAzureManagedRedis instead, which provisions Azure Managed Redis. Azure Cache for Redis announced its retirement timeline.

Getting started

Prerequisites

Add the integration

From your AppHost directory, add the Aspire.Hosting.Azure.Redis integration with the Aspire CLI:

aspire add Aspire.Hosting.Azure.Redis

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, register an Azure Managed Redis resource with either C# or TypeScript:

C#

var redis = builder.AddAzureManagedRedis("cache");

var myService = builder.AddProject<Projects.MyService>()
                       .WithReference(redis);

TypeScript

const redis = await builder.addAzureManagedRedis("cache");

const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
                       .withReference(redis);

Connection Properties

When you reference Azure Redis resources using WithReference, the following connection properties are made available to the consuming project:

Azure Redis Enterprise

Property Name Description
Host The hostname of the Azure Redis Enterprise database endpoint.
Port The port of the Azure Redis Enterprise database endpoint (10000 for Azure).
Uri The Redis connection URI. In Azure mode this is redis://{Host}; when running via RunAsContainer it matches redis://[:{Password}@]{Host}:{Port}.
Password The access key for the Redis server. Empty when using Entra ID authentication; populated when using WithAccessKeyAuthentication() or running as a container.

Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called cache becomes CACHE_URI.

Additional documentation

Feedback & contributing

https://github.com/microsoft/aspire

*Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Aspire.Hosting.Azure.Redis:

Package Downloads
CommunityToolkit.Aspire.Hosting.Azure.Dapr.Redis

An Aspire hosting integration for configuring Azure Cache for Redis as a Dapr state store or pub/sub component in your AppHost.

CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis

Package Description

Aspire.Hosting.Azure.Provisioning.RedisEnterprise

Opt-in Azure Provisioning Redis Enterprise APIs for polyglot Aspire AppHosts.

Aspire.Hosting.Azure.Provisioning.Redis

Opt-in Azure Provisioning Redis APIs for polyglot Aspire AppHosts.

Squirrel.Caching.AzureRedis

Reusable .NET building blocks for cloud-native applications.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on Aspire.Hosting.Azure.Redis:

Repository Stars
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 10, Wolverine, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
foxminchan/BookWorm
An Aspire reference architecture for cloud-native microservices and agentic AI with MCP, A2A & AG-UI
Version Downloads Last Updated
13.6.4 3,704 10/24/2026
13.6.3 2,589 10/21/2026
13.6.2 1,704 10/20/2026
13.6.1 12,728 10/7/2026
13.6.0 24,404 9/29/2026
13.5.4 15,442 9/15/2026
13.5.3 51,949 8/25/2026
13.5.2 7,166 8/21/2026
13.5.1 2,430 8/20/2026
13.5.0 8,269 8/18/2026
13.4.6 91,392 6/19/2026
13.4.5 4,994 6/17/2026
13.4.4 6,008 6/15/2026
13.4.3 11,001 6/8/2026
13.4.2 5,867 6/3/2026
13.4.1 491 6/3/2026
13.4.0 2,558 6/1/2026
13.3.5 16,812 5/21/2026
13.3.4 1,898 5/19/2026
13.3.3 6,788 5/15/2026
Loading failed