Skip to content

🚀 Feature Request: Support extension version pinning in devcontainer.json #730

@jairrocha

Description

@jairrocha

Problem

Currently, when defining extensions in devcontainer.json:

{
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-dotnettools.csharp"
      ]
    }
  }
}

The latest version of the extension is always installed.

This creates issues in team environments because:

  • Extension updates can introduce breaking changes
  • Developers may end up with inconsistent environments
  • Builds and development workflows become less predictable

Proposed Solution

Allow specifying a version when declaring extensions, for example:

{
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-dotnettools.csharp@1.25.0"
      ]
    }
  }
}

Alternative Syntax (optional)

Another possible approach could be:

{
  "customizations": {
    "vscode": {
      "extensions": [
        {
          "id": "ms-dotnettools.csharp",
          "version": "1.25.0"
        }
      ]
    }
  }
}

Benefits

  • Reproducible development environments
  • Better stability for teams and CI/CD workflows
  • Alignment with other ecosystems (e.g., npm, pip, Docker image tags)
  • Eliminates need for manual .vsix workarounds

Current Workarounds

  • Manually downloading .vsix files and installing them via scripts
  • Using postCreateCommand to install specific versions (not always reliable)
  • Maintaining custom Docker images with pre-installed extensions

These approaches add complexity and reduce maintainability.


Additional Context

This feature would significantly improve Dev Container usability in professional environments, especially for teams working with strict version control and reproducibility requirements.


Thank you 🙏

Thanks for the amazing work on Dev Containers! This feature would make it even more powerful for team-based development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions