Skip to content

VS Code extension: "aspire" launch configuration does not accept environment variables #16445

@karolz-ms

Description

@karolz-ms

Repro steps

  1. Create an Aspire app (any starter app is fine)
  2. Open application folder in VS Code
  3. Add the following launch configuration to launch.json
{
  "type": "aspire",
  "request": "launch",
  "name": "Aspire: Launch default AppHost",
  "program": "${workspaceFolder}",
  "env": {
    "FOO": "bar"
  }
}

Expected

Should work

Actual

A warning that env property is not allowed.
The environment variable is not set during application run (F5).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions