Aspire.Hosting.Valkey 13.6.4

Prefix Reserved
dotnet add package Aspire.Hosting.Valkey --version 13.6.4
                    
NuGet\Install-Package Aspire.Hosting.Valkey -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.Valkey" 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.Valkey" Version="13.6.4" />
                    
Directory.Packages.props
<PackageReference Include="Aspire.Hosting.Valkey" />
                    
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.Valkey --version 13.6.4
                    
#r "nuget: Aspire.Hosting.Valkey, 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.Valkey@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.Valkey&version=13.6.4
                    
Install as a Cake Addin
#tool nuget:?package=Aspire.Hosting.Valkey&version=13.6.4
                    
Install as a Cake Tool

Valkey hosting integration

Use this integration to model, configure, and orchestrate a Valkey cache resource in an Aspire solution.

Getting started

Add the integration

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

aspire add Aspire.Hosting.Valkey

Usage example

In the AppHost, add a Valkey resource and reference it from another resource with either C# or TypeScript:

C#

var valkey = builder.AddValkey("cache");

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

TypeScript

const valkey = await builder.addValkey("cache");

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

REPL

Call WithRepl() to opt into a REPL command on the Valkey resource in the dashboard:

builder.AddValkey("valkey").WithRepl();
await builder.addValkey("valkey").withRepl();

REPL access is disabled by default and is available only in run mode. Enable it only for trusted dashboard users: the shell uses the resource's configured credentials and is not read-only. Sharing the dashboard through a tunnel, Codespaces, or VS Code remote development also exposes this capability to users who can execute resource commands.

Use quit before closing the terminal tab to end the session cleanly. Closing the tab alone can leave valkey-cli running inside the container. Stopping the container also ends any remaining REPL processes.

When the container is running, this opens an authenticated valkey-cli session in the terminal dock. Use quit to exit. The session runs inside the container using Docker (or the configured Podman runtime); no local Valkey client is required. Passwords are passed through environment variables, not command-line arguments.

Connection Properties

When you reference a Valkey resource using WithReference, the following connection properties are made available to the consuming project:

Valkey

The Valkey resource exposes the following connection properties:

Property Name Description
Host The hostname or IP address of the Valkey server
Port The port number the Valkey server is listening on
Password The password for authentication
Uri The connection URI, with the format valkey://:{Password}@{Host}:{Port}

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

Additional documentation

Feedback & contributing

https://github.com/microsoft/aspire

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 (3)

Showing the top 3 NuGet packages that depend on Aspire.Hosting.Valkey:

Package Downloads
Aspire.Hosting.AWS

Add support for provisioning AWS application resources and configuring the AWS SDK for .NET.

Bielu.Aspire.Infisical

Package Description

Habichuelo.Aspire.Hosting.Aws

A drop-in Aspire.Hosting.AWS build that supports using CDK environment stacks at run time and deploying resources and relationships configured through the stack APIs.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on Aspire.Hosting.Valkey:

Repository Stars
aws/integrations-on-dotnet-aspire-for-aws
This repository contains integrations with Aspire for AWS.
PacktPublishing/Pragmatic-Microservices-with-CSharp-and-Azure
Pragmatic Microservices with C# and Azure, published by Packt
Version Downloads Last Updated
13.6.4 261 10/24/2026
13.6.3 1,097 10/21/2026
13.6.2 1,540 10/20/2026
13.6.1 12,362 10/7/2026
13.6.0 15,413 9/29/2026
13.5.4 16,229 9/15/2026
13.5.3 21,957 8/25/2026
13.5.2 2,675 8/21/2026
13.5.1 1,137 8/20/2026
13.5.0 46,299 8/18/2026
13.4.6 98,600 6/19/2026
13.4.5 8,430 6/17/2026
13.4.4 5,214 6/15/2026
13.4.3 37,693 6/8/2026
13.4.2 3,052 6/3/2026
13.4.1 401 6/3/2026
13.4.0 3,098 6/1/2026
13.3.5 165,979 5/21/2026
13.3.4 4,853 5/19/2026
13.3.3 5,798 5/15/2026
Loading failed