Update devcontainer to support .NET 9 and .NET 10#1843
Open
brendandburns wants to merge 2 commits into
Open
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository devcontainer to support building/testing projects targeting net9.0 and net10.0 by switching from a fixed .NET 8 SDK image to a Dockerfile-based devcontainer build that includes .NET 10 and installs .NET 9 side-by-side.
Changes:
- Add a
.devcontainer/Dockerfilebased onmcr.microsoft.com/dotnet/sdk:10.0and install the .NET 9 SDK viadotnet-install.sh. - Update
.devcontainer/devcontainer.jsonto use"build"(Dockerfile) instead of a fixed"image".
Show a summary per file
| File | Description |
|---|---|
| .devcontainer/Dockerfile | Introduces a .NET 10-based devcontainer image and installs the .NET 9 SDK side-by-side. |
| .devcontainer/devcontainer.json | Switches devcontainer configuration from an image reference to a Dockerfile build. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Low
Comment on lines
+3
to
+11
| # Install .NET 9 SDK side-by-side so the container supports both net9.0 and net10.0 builds. | ||
| RUN set -eux; \ | ||
| apt-get update; \ | ||
| apt-get install -y --no-install-recommends curl ca-certificates; \ | ||
| rm -rf /var/lib/apt/lists/*; \ | ||
| curl -fsSL https://dot.net/v1/dotnet-install.sh -o /tmp/dotnet-install.sh; \ | ||
| chmod +x /tmp/dotnet-install.sh; \ | ||
| /tmp/dotnet-install.sh --channel 9.0 --quality ga --install-dir /usr/share/dotnet --skip-non-versioned-files; \ | ||
| rm -f /tmp/dotnet-install.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.devcontainer/devcontainer.jsonfrom a fixed.NET 8image to a Dockerfile-based build.devcontainer/Dockerfilebased onmcr.microsoft.com/dotnet/sdk:10.0.NET 9 SDKside-by-side viadotnet-install.shWhy
The repository currently targets newer TFMs in CI and local workflows. This devcontainer update ensures contributors can build and test net9.0/net10.0 projects from the container environment.
Validation
.NET 9and.NET 10SDK availability is provisioned by container build steps