From a87485ade66cec67a67cee70749649a80b15edc1 Mon Sep 17 00:00:00 2001 From: David Pine Date: Wed, 5 Jun 2024 13:56:28 -0500 Subject: [PATCH] Update and correct hosting bits. Fixes #717 --- docs/caching/caching-components.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/caching/caching-components.md b/docs/caching/caching-components.md index 97faca5cbb..a286c935f7 100644 --- a/docs/caching/caching-components.md +++ b/docs/caching/caching-components.md @@ -1,7 +1,7 @@ --- title: Implement caching with .NET Aspire components description: Learn how to connect to Redis and cache data using .NET Aspire components. -ms.date: 05/14/2024 +ms.date: 06/05/2024 ms.topic: tutorial --- @@ -45,10 +45,23 @@ Visual Studio creates a new .NET Aspire solution that consists of the following 1. Add the [.NET Aspire Hosting Redis](https://www.nuget.org/packages/Aspire.Hosting.Redis) package to the `AspireRedis.AppHost` project: + ### [.NET CLI](#tab/dotnet-cli) + ```dotnetcli dotnet add package Aspire.Hosting.Redis ``` + ### [PackageReference](#tab/package-reference) + + ```xml + + ``` + + --- + + For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-package) or [Manage package dependencies in .NET applications](/dotnet/core/tools/dependencies). + 2. Update the _:::no-loc text="Program.cs":::_ file of the `AspireRedis.AppHost` project to match the following code: ```csharp