devcontainers / devcontainers/spec

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

Offen
#730 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
5.7k
Forks
496
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Problem

Currently, when defining extensions in `devcontainer.json`:

```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:

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

---

### Alternative Syntax (optional)

Another possible approach could be:

```json
{
"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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das devcontainer.json-Schema und die bestehende Verarbeitung von customizations.vscode.extensions zu finden. Vergleiche die vorgeschlagene String-Syntax mit der optionalen Objekt-Syntax und bestimme anschließend das für eine angeheftete Version erforderliche Validierungs- und Installationsverhalten. Als abgeschlossen gilt, dass eine unterstützte, dokumentierte Syntax die angeforderte Erweiterungsversion zuverlässig installiert, ohne Deklarationen ohne Versionsangabe zu beeinträchtigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
json, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.