From 42da7b6acf40261879f9178e92ac3b35f3db52bc Mon Sep 17 00:00:00 2001 From: David Pine Date: Thu, 24 Oct 2024 09:32:11 -0500 Subject: [PATCH] A bit more clean up --- docs/app-host/eventing.md | 6 +++--- docs/fundamentals/aspire-sdk-templates.md | 4 ++-- docs/fundamentals/setup-tooling.md | 6 +++--- docs/includes/aspire-prereqs.md | 2 +- docs/toc.yml | 2 ++ docs/whats-new/dotnet-aspire-9-release-candidate-1.md | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/app-host/eventing.md b/docs/app-host/eventing.md index 7337f965b9..ccddf9b198 100644 --- a/docs/app-host/eventing.md +++ b/docs/app-host/eventing.md @@ -24,13 +24,13 @@ All of the preceding events are analogous to the [app host life cycles](xref:dot To subscribe to the built-in app host events, use the eventing API. After you have a distributed application builder instance, walk up to the property and call the API. Consider the following sample app host _Program.cs_ file: -:::code source="snippets/AspireApp/AspireApp.AppHost/Program.cs"::: +:::code source="snippets/AspireApp/AspireApp.AppHost/Program.cs" highlight="17-25,27-35,37-45"::: The preceding code is based on the starter template with the addition of the subscribe calls. The `Subscribe` API returns a instance that you can use to unsubscribe from the event. It's common to discard these, as you don't usually need to unsubscribe from events as the entire app is torn down when the app host is shut down. When the app host is run, by the time the .NET Aspire dashboard is displayed, you should see the following log output in the console: -:::code language="Output" source="snippets/AspireApp/AspireApp.AppHost/Console.txt" highlight="2,10,16"::: +:::code language="plaintext" source="snippets/AspireApp/AspireApp.AppHost/Console.txt" highlight="2,10,16"::: The log output confirms that event handlers are executed in the order of the app host life cycle events. The subscription order doesn't affect execution order. The `BeforeStartEvent` is triggered first, followed by `AfterEndpointsAllocatedEvent`, and finally `AfterResourcesCreatedEvent`. @@ -45,7 +45,7 @@ In addition to the app host events, you can also subscribe to resource events. R To subscribe to resource events, use the eventing API. After you have a distributed application builder instance, walk up to the property and call the API. Consider the following sample app host _Program.cs_ file: -:::code source="snippets/AspireApp/AspireApp.ResourceAppHost/Program.cs"::: +:::code source="snippets/AspireApp/AspireApp.ResourceAppHost/Program.cs" highlight="8-17,19-28"::: The preceding code subscribes to the `ConnectionStringAvailableEvent` and `BeforeResourceStartedEvent` events on the `cache` resource. When is called, it returns an where `T` is a . The resource builder exposes the resource as the property. This resource is then passed to the `Subscribe` API to subscribe to the events on the resource. diff --git a/docs/fundamentals/aspire-sdk-templates.md b/docs/fundamentals/aspire-sdk-templates.md index b3f6f1a9c4..aa46f9e29e 100644 --- a/docs/fundamentals/aspire-sdk-templates.md +++ b/docs/fundamentals/aspire-sdk-templates.md @@ -16,7 +16,7 @@ The .NET Aspire templates are available in the [📦 Aspire.ProjectTemplates](ht ::zone pivot="visual-studio" -The .NET Aspire templates are installed automatically when you install Visual Studio 17.12 or later. +The .NET Aspire templates are installed automatically when you install Visual Studio 17.9 or later. :::zone-end :::zone pivot="vscode,dotnet-cli" @@ -33,7 +33,7 @@ dotnet new install Aspire.ProjectTemplates ::zone pivot="visual-studio" -The .NET Aspire templates are installed automatically when you install Visual Studio 17.12 or later. To see what .NET Aspire templates are available, select **File** > **New** > **Project** in Visual Studio, and search for "Aspire" in the search bar (Alt+S). You'll see a list of available .NET Aspire project templates: +The .NET Aspire templates are installed automatically when you install Visual Studio 17.9 or later. To see what .NET Aspire templates are available, select **File** > **New** > **Project** in Visual Studio, and search for "Aspire" in the search bar (Alt+S). You'll see a list of available .NET Aspire project templates: :::image type="content" source="media/vs-create-dotnet-aspire-proj.png" alt-text="Visual Studio: Create new project and search for 'Aspire'." lightbox="media/vs-create-dotnet-aspire-proj.png"::: diff --git a/docs/fundamentals/setup-tooling.md b/docs/fundamentals/setup-tooling.md index 97bc3967b0..a2e30aa778 100644 --- a/docs/fundamentals/setup-tooling.md +++ b/docs/fundamentals/setup-tooling.md @@ -26,16 +26,16 @@ To work with .NET Aspire, you need the following installed locally: - An OCI compliant container runtime, such as: - [Docker Desktop](https://www.docker.com/products/docker-desktop) or [Podman](https://podman.io/). For more information, see [Container runtime](#container-runtime). - An Integrated Developer Environment (IDE) or code editor, such as: - - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.12 or higher (Optional) + - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.9 or higher (Optional) - [Visual Studio Code](https://code.visualstudio.com/) (Optional) - [C# Dev Kit: Extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) (Optional) - [JetBrains Rider with .NET Aspire Plugin](https://blog.jetbrains.com/dotnet/2024/02/19/jetbrains-rider-and-the-net-aspire-plugin/) :::zone pivot="visual-studio" -Visual Studio 2022 17.12 or higher includes the latest [.NET Aspire SDK](dotnet-aspire-sdk.md) by default when you install the Web & Cloud workload. To verify that you have the .NET Aspire SDK installed, ... +Visual Studio 2022 17.9 or higher includes the latest [.NET Aspire SDK](dotnet-aspire-sdk.md) by default when you install the Web & Cloud workload. To verify that you have the .NET Aspire SDK installed, ... -If you have an earlier version of Visual Studio 2022, you can either upgrade to Visual Studio 2022 17.12 or you can install the .NET Aspire SDK using the following steps: +If you have an earlier version of Visual Studio 2022, you can either upgrade to Visual Studio 2022 17.9 or you can install the .NET Aspire SDK using the following steps: To install the .NET Aspire workload in Visual Studio 2022, use the Visual Studio installer. diff --git a/docs/includes/aspire-prereqs.md b/docs/includes/aspire-prereqs.md index 849100e733..1290d73cce 100644 --- a/docs/includes/aspire-prereqs.md +++ b/docs/includes/aspire-prereqs.md @@ -8,7 +8,7 @@ To work with .NET Aspire, you need the following installed locally: - An OCI compliant container runtime, such as: - [Docker Desktop](https://www.docker.com/products/docker-desktop) or [Podman](https://podman.io/). - An Integrated Developer Environment (IDE) or code editor, such as: - - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.12 or higher (Optional) + - [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) version 17.9 or higher (Optional) - [Visual Studio Code](https://code.visualstudio.com/) (Optional) - [C# Dev Kit: Extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) (Optional) diff --git a/docs/toc.yml b/docs/toc.yml index 4e2d94d5b4..572cf40d02 100644 --- a/docs/toc.yml +++ b/docs/toc.yml @@ -14,6 +14,8 @@ items: href: get-started/add-aspire-existing-app.md - name: Setup and tooling href: fundamentals/setup-tooling.md + - name: .NET Aspire SDK + href: fundamentals/dotnet-aspire-sdk.md - name: What's new in .NET Aspire href: whats-new/index.yml - name: Upgrade to .NET Aspire 9.0 diff --git a/docs/whats-new/dotnet-aspire-9-release-candidate-1.md b/docs/whats-new/dotnet-aspire-9-release-candidate-1.md index 065a39a0a0..cd9e30c9ed 100644 --- a/docs/whats-new/dotnet-aspire-9-release-candidate-1.md +++ b/docs/whats-new/dotnet-aspire-9-release-candidate-1.md @@ -148,7 +148,7 @@ In order to upgrade an existing project to .NET Aspire 9 RC1, you need to update ``` -That's it! You've successfully upgraded your project to .NET Aspire 9 RC1. If you're using Visual Studio, it's recommended to upgrade to version 17.12 Preview 3 or later in order to take advantage of the new features and improvements for .NET Aspire 9 RC1. +That's it! You've successfully upgraded your project to .NET Aspire 9 RC1. If you're using Visual Studio, it's recommended to upgrade to version 17.9 Preview 3 or later in order to take advantage of the new features and improvements for .NET Aspire 9 RC1. ### Upgrade an existing project to .NET Aspire 9 RC1 using the Upgrade Assistant