From 4aa37052a5a497c4104baf026b2b151d91388f80 Mon Sep 17 00:00:00 2001 From: Bert Date: Tue, 18 Nov 2025 09:06:38 +0100 Subject: [PATCH 1/2] Add devcontainer.json for .NET development setup Added a `devcontainer.json` file to configure a development container for .NET projects. Configured the container to use the `mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm` image. Included the `ghcr.io/devcontainers/features/dotnet:2` feature with .NET SDK version `10.0.100` and additional versions `6.0.428`, `8.0.414`, and `9.0.307`. Added a `customizations` section for Visual Studio Code, specifying essential extensions for .NET, GitHub, Azure DevOps, and other tools. Commented-out sections for port forwarding, post-create commands, and root user configuration were also included for flexibility. This setup ensures a consistent and productive development environment for .NET projects. --- .devcontainer/devcontainer.json | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..7783956ef --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,51 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet +{ + "name": "coverlet .NET 10.0)", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": { + "version": "10.0.100", + "additionalVersions": ["6.0.428", "8.0.414", "9.0.307"] + } + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [5000, 5001], + // "portsAttributes": { + // "5001": { + // "protocol": "https" + // } + // } + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "dotnet restore", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "ms-dotnettools.vscode-dotnet-runtime", + "GitHub.vscode-pull-request-github", + "ms-dotnettools.csharp", + "ms-dotnettools.dotnet-interactive-vscode", + "ms-dotnettools.csdevkit", + "ms-vscode.powershell", + "ms-azure-devops.azure-pipelines", + "GitHub.copilot-chat", + "GitHub.copilot", + "mhutchie.git-graph", + "streetsidesoftware.code-spell-checker", + "streetsidesoftware.code-spell-checker-german", + "streetsidesoftware.code-spell-checker-english", + "fernandoescolar.vscode-solution-explorer"] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} From 766ddc346330c733a4059c572340f3d2569d0eb2 Mon Sep 17 00:00:00 2001 From: Bert Date: Tue, 18 Nov 2025 08:14:17 +0000 Subject: [PATCH 2/2] Update additionalVersions in devcontainer.json for .NET feature --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7783956ef..9d491686a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,7 +7,7 @@ "features": { "ghcr.io/devcontainers/features/dotnet:2": { "version": "10.0.100", - "additionalVersions": ["6.0.428", "8.0.414", "9.0.307"] + "additionalVersions": ["6.0.428", "8.0.416", "9.0.307"] } },