Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AspireNew to Visual Studio Code? Get it now.
Aspire

Aspire

Microsoft

microsoft.com
|
1,542 installs
| (0) | Free
Official Aspire extension for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Aspire VS Code Extension

The Aspire VS Code extension provides a set of commands and tools to help you work with Aspire and Aspire AppHost projects directly from Visual Studio Code.

Commands

The extension adds the following commands to VS Code:

Command Description Availability
Aspire: New Aspire project Create a new Aspire apphost or starter app from a template. Available
Aspire: Add an integration Add a hosting integration (Aspire.Hosting.*) to the Aspire apphost. Available
Aspire: Configure launch.json Adds the default Aspire debugger launch configuration to your workspace's launch.json, which will detect and run the apphost in the workspace. Available
Aspire: Manage configuration settings Manage configuration settings including feature flags. Available
Aspire: Open Aspire terminal Open an Aspire VS Code terminal for working with Aspire projects. Available
Aspire: Publish deployment artifacts Generates deployment artifacts for an Aspire apphost. Preview
Aspire: Deploy app Deploy the contents of an Aspire apphost to its defined deployment targets. Preview
Aspire: Update integrations Update hosting integrations and Aspire SDK in the apphost. Preview

All commands are available from the Command Palette (Cmd+Shift+P or Ctrl+Shift+P) and are grouped under the "Aspire" category.

Debugging

To run an Aspire application using the Aspire VS Code extension, you must be using Aspire 9.5 or higher. Some features are only available when certain VS Code extensions are installed and available. See the feature matrix below:

Feature Requirement Notes
Debug C# projects C# Dev Kit or C# for Visual Studio Code The C# extension is required for debugging .NET projects. Apphosts will be built in VS Code if C# Dev Kit is available.
Debug Python projects Python extension Required for debugging Python projects

To run and debug your Aspire application, add an entry to the workspace launch.json. You can change the apphost to run by setting the program field to an apphost project file based on the below example:

{
    "type": "aspire",
    "request": "launch",
    "name": "Aspire: Launch MyAppHost",
    "program": "${workspaceFolder}/MyAppHost/MyAppHost.csproj"
}

Requirements

Aspire CLI

The Aspire CLI must be installed and available on the path. You can install using the following scripts.

On Windows:

iex "& { $(irm https://aspire.dev/install.ps1) }"

On Linux or macOS:

curl -sSL https://aspire.dev/install.sh | bash

.NET

.NET 8+ must be installed.

Feedback and Issues

Please report issues or feature requests on the Aspire GitHub repository using the label area-extension.

Customizing debugger attributes for resources

Language Debugger entry
C# project
Python python

The debuggers property stores common debug configuration properties for different types of Aspire services. C#-based services have common debugging properties under project. Python-based services have their common properties under python. There is also a special entry for the apphost (apphost). For example:

{
    "type": "aspire",
    "request": "launch",
    "name": "Aspire: Launch MyAppHost",
    "program": "${workspaceFolder}/MyAppHost/MyAppHost.csproj",
    "debuggers": {
        "project": {
            "console": "integratedTerminal",
            "logging": {
                "moduleLoad": false
            }
        },
        "apphost": {
            "stopAtEntry": true
        }
    }
}

License

See LICENSE.TXT for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft