diff --git a/docs/fundamentals/media/setup-tooling/visual-studio-code-create-project.png b/docs/fundamentals/media/setup-tooling/visual-studio-code-create-project.png new file mode 100644 index 0000000000..2ca97af8ba Binary files /dev/null and b/docs/fundamentals/media/setup-tooling/visual-studio-code-create-project.png differ diff --git a/docs/fundamentals/setup-tooling.md b/docs/fundamentals/setup-tooling.md index 21b19ea22f..4f829108a2 100644 --- a/docs/fundamentals/setup-tooling.md +++ b/docs/fundamentals/setup-tooling.md @@ -86,6 +86,26 @@ To check your version of .NET Aspire, run this command: dotnet workload list ``` +# [Visual Studio Code](#tab/visual-studio-code) + +You can install .NET Aspire from a Visual Studio Code terminal window using the .NET CLI. To ensure that you install the latest version of the .NET Aspire workload, run the following [dotnet workload update](/dotnet/core/tools/dotnet-workload-update) command before you install .NET Aspire: + +```dotnetcli +dotnet workload update +``` + +To install the .NET Aspire workload from the .NET CLI, use the [dotnet workload install](/dotnet/core/tools/dotnet-workload-install) command: + +```dotnetcli +dotnet workload install aspire +``` + +To check your version of .NET Aspire, run this command: + +```dotnetcli +dotnet workload list +``` + --- ## Container runtime @@ -185,6 +205,16 @@ To create a .NET Aspire project with a sample UI and API included: dotnet new aspire-starter ``` +# [Visual Studio Code](#tab/visual-studio-code) + +To create a .NET Aspire project using Visual Studio Code: + +1. Open the Visual Studio Code command palette (`Ctrl+Shift+P`). +1. Search for *.NET* and then select the **.NET: New Project...** command. +1. Select your desired .NET Aspire template. + +:::image type="content" source="media/setup-tooling/visual-studio-code-create-project.png" alt-text="A screenshot showing how to create a new .NET Aspire project in Visual Studio code."::: + --- ## .NET Aspire dashboard diff --git a/docs/get-started/build-your-first-aspire-app.md b/docs/get-started/build-your-first-aspire-app.md index c26ac7e46b..51e35b947a 100644 --- a/docs/get-started/build-your-first-aspire-app.md +++ b/docs/get-started/build-your-first-aspire-app.md @@ -41,6 +41,16 @@ dotnet run --project AspireSample/AspireSample.AppHost For more information, see [dotnet run](/dotnet/core/tools/dotnet-run). +### [Visual Studio Code](#tab/visual-studio-code) + +You can run a .NET Aspire from the terminal window using the .NET CLI. + +```dotnetcli +dotnet run --project AspireSample/AspireSample.AppHost +``` + +For more information, see [dotnet run](/dotnet/core/tools/dotnet-run). + --- 1. The app displays the .NET Aspire dashboard in the browser. We'll look at the dashboard in more detail later. For now, find the **webfrontend** project in the list of resources and select the project's **localhost** endpoint. diff --git a/docs/includes/file-new-aspire.md b/docs/includes/file-new-aspire.md index 258727c1f9..09298ca520 100644 --- a/docs/includes/file-new-aspire.md +++ b/docs/includes/file-new-aspire.md @@ -29,4 +29,20 @@ dotnet new aspire-starter --use-redis-cache --output AspireSample For more information, see [dotnet new](/dotnet/core/tools/dotnet-new). The .NET CLI creates a new solution that is structured to use .NET Aspire. +### [Visual Studio Code](#tab/visual-studio-code) + +Visual Studio Code provides .NET Aspire project templates that handle some initial setup configurations for you. Complete the following steps to create a project for this quickstart: + +1. Open the Visual Studio Code command palette (`Ctrl+Shift+P`). +1. Search for *.NET* and then select the **.NET: New Project...** command. + + :::image type="content" source="../fundamentals/media/setup-tooling/visual-studio-code-create-project.png" alt-text="A screenshot showing the new project list in Visual Studio Code."::: + +1. Select **.NET Aspire Starter Application**. +1. Enter a **Project Name** of *AspireSample*. +1. Select the directory where you would like to save the app. +1. Select **Create Project**. + +Visual Studio Code creates and loads the new .NET Aspire. + ---