Skip to content

Add vs code tabs #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions docs/fundamentals/setup-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions docs/get-started/build-your-first-aspire-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 16 additions & 0 deletions docs/includes/file-new-aspire.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---
Loading