MVFC.Aspire.Helpers.Redis
9.0.3
dotnet add package MVFC.Aspire.Helpers.Redis --version 9.0.3
NuGet\Install-Package MVFC.Aspire.Helpers.Redis -Version 9.0.3
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="MVFC.Aspire.Helpers.Redis" Version="9.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MVFC.Aspire.Helpers.Redis" Version="9.0.3" />
<PackageReference Include="MVFC.Aspire.Helpers.Redis" />
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 MVFC.Aspire.Helpers.Redis --version 9.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MVFC.Aspire.Helpers.Redis, 9.0.3"
#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 MVFC.Aspire.Helpers.Redis@9.0.3
#: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=MVFC.Aspire.Helpers.Redis&version=9.0.3
#tool nuget:?package=MVFC.Aspire.Helpers.Redis&version=9.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MVFC.Aspire.Helpers.Redis
Helper for integrating with Redis in .NET Aspire projects, including distributed caching and Redis Commander UI.
Motivation
For local dev, Redis is often set up via an ad‑hoc container:
- No clear place to centralize password configuration.
- No built‑in UI to inspect keys/values.
- No consistent way to mount volumes and preserve state.
With .NET Aspire you can start a Redis container, but you still need to:
- Decide how to expose Redis to your projects.
- Configure Redis Commander (or similar) manually.
- Keep connection strings aligned across services.
MVFC.Aspire.Helpers.Redis addresses this by:
AddRedis(...)to provision Redis.WithPassword(...),WithCommander(...),WithDataVolume(...)to cover common setups.project.WithReference(redis)to pass the Redis connection string via configuration.
Overview
This project provides extension methods to facilitate integration with Redis in .NET Aspire projects, including distributed caching and Redis Commander UI.
Project Structure
MVFC.Aspire.Helpers.Redis: Helpers and extensions library for Redis.
Features
- Adds a configured Redis container.
- Support for Redis Commander UI.
- Support for data persistence via Docker volume (AOF enabled).
- Support for password.
Compatible Images
redisrediscommander/redis-commander(UI)
Installation
dotnet add package MVFC.Aspire.Helpers.Redis
Quick Aspire usage (AppHost)
using Aspire.Hosting;
using MVFC.Aspire.Helpers.Redis;
var builder = DistributedApplication.CreateBuilder(args);
var redis = builder.AddRedis("redis")
.WithPassword("my-password")
.WithCommander()
.WithDataVolume("redis-data");
builder.AddProject<Projects.MVFC_Aspire_Helpers_Playground_Api>("api-example")
.WithReference(redis)
.WaitFor(redis);
await builder.Build().RunAsync();
Provisioning diagram
sequenceDiagram
participant Aspire as .NET Aspire
participant Container as Redis Container
participant UI as Redis Commander
Aspire->>Container: Start container (redis)
Container-->>Aspire: Ready (port 6379 available)
Aspire->>UI: Start Redis Commander (if configured)
Aspire->>App: Start App with Redis ConnectionString
Fluent methods
| Method | Description |
|---|---|
WithDockerImage(image, tag) |
Overrides the Docker image used. |
WithPassword(password) |
Defines the Redis password. |
WithCommander(port?) |
Adds the Redis Commander UI. |
WithDataVolume(volumeName) |
Enables persistence with Docker volume (AOF). |
AddRedis parameters
name: Redis resource name.port(optional): Redis port (default6379).
Other optional parameters
connectionStringSection(optional):
Path to the configuration section containing the Redis connection string.
Default:"ConnectionStrings:redis".
{
"ConnectionStrings": {
"redis": "localhost:6379"
}
}
Port details
- Redis port: defined via
port(default6379). - Redis Commander port: random by default; can be defined via
commanderPortinWithCommander.
Requirements
- .NET 9+
- Aspire.Hosting >= 9.5.0
License
Apache-2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 is compatible. 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.
-
net10.0
- Aspire.Hosting (>= 13.1.2)
-
net9.0
- Aspire.Hosting (>= 13.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.3 | 95 | 4/12/2026 |
| 9.0.2 | 91 | 4/12/2026 |
| 9.0.1 | 95 | 4/12/2026 |
| 9.0.0 | 97 | 4/12/2026 |
| 8.0.2 | 92 | 4/11/2026 |
| 8.0.1 | 107 | 4/3/2026 |
| 8.0.0 | 95 | 4/2/2026 |
| 7.3.3 | 96 | 3/31/2026 |
| 7.3.2 | 102 | 3/30/2026 |
| 7.3.1 | 94 | 3/30/2026 |
| 7.3.0 | 103 | 3/30/2026 |
| 7.2.2 | 97 | 3/29/2026 |
| 7.2.1 | 97 | 3/29/2026 |
| 7.2.0 | 97 | 3/29/2026 |
| 7.1.0 | 92 | 3/22/2026 |
| 6.4.4 | 93 | 3/21/2026 |
| 6.4.3 | 100 | 3/15/2026 |
| 6.4.2 | 97 | 3/15/2026 |
| 6.4.1 | 139 | 3/10/2026 |
| 6.4.0 | 93 | 3/9/2026 |
Loading failed