Aspire.Hosting.Garnet 13.6.4

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

Garnet hosting integration

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

Getting started

Add the integration

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

aspire add Aspire.Hosting.Garnet

Usage example

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

C#

var garnet = builder.AddGarnet("cache");

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

TypeScript

const garnet = await builder.addGarnet("cache");

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

Connection Properties

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

Garnet

The Garnet resource exposes the following connection properties:

Property Name Description
Host The hostname or IP address of the Garnet server
Port The port number the Garnet server is listening on
Password The password for authentication (available when a password parameter is configured)
Uri The connection URI, with the format redis://:{Password}@{Host}:{Port}

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

*Garnet MIT License. Copyright (c) Microsoft Corporation..

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

This package is not used by any NuGet packages.

GitHub repositories (2)

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

Repository Stars
gurb/NarForum
NarForum is a simple and flexible forum software built with .NET 8 and Blazor.
PacktPublishing/Pragmatic-Microservices-with-CSharp-and-Azure
Pragmatic Microservices with C# and Azure, published by Packt
Version Downloads Last Updated
13.6.4 238 10/24/2026
13.6.3 202 10/21/2026
13.6.2 241 10/20/2026
13.6.1 3,340 10/7/2026
13.6.0 9,463 9/29/2026
13.5.4 2,319 9/15/2026
13.5.3 3,289 8/25/2026
13.5.2 548 8/21/2026
13.5.1 285 8/20/2026
13.5.0 7,860 8/18/2026
13.4.6 9,276 6/19/2026
13.4.5 346 6/17/2026
13.4.4 875 6/15/2026
13.4.3 676 6/8/2026
13.4.2 331 6/3/2026
13.4.1 148 6/3/2026
13.4.0 5,957 6/1/2026
13.3.5 2,701 5/21/2026
13.3.4 2,104 5/19/2026
13.3.3 777 5/15/2026
Loading failed