Skip to content

Commit 266a82f

Browse files
authored
Add devcontainer.json for .NET development setup (#1784)
* 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. * Update additionalVersions in devcontainer.json for .NET feature
1 parent 893dcc8 commit 266a82f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
3+
{
4+
"name": "coverlet .NET 10.0)",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0-bookworm",
7+
"features": {
8+
"ghcr.io/devcontainers/features/dotnet:2": {
9+
"version": "10.0.100",
10+
"additionalVersions": ["6.0.428", "8.0.416", "9.0.307"]
11+
}
12+
},
13+
14+
// Features to add to the dev container. More info: https://containers.dev/features.
15+
// "features": {},
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
// "forwardPorts": [5000, 5001],
19+
// "portsAttributes": {
20+
// "5001": {
21+
// "protocol": "https"
22+
// }
23+
// }
24+
25+
// Use 'postCreateCommand' to run commands after the container is created.
26+
// "postCreateCommand": "dotnet restore",
27+
28+
// Configure tool-specific properties.
29+
"customizations": {
30+
"vscode": {
31+
"extensions": [
32+
"ms-dotnettools.vscode-dotnet-runtime",
33+
"GitHub.vscode-pull-request-github",
34+
"ms-dotnettools.csharp",
35+
"ms-dotnettools.dotnet-interactive-vscode",
36+
"ms-dotnettools.csdevkit",
37+
"ms-vscode.powershell",
38+
"ms-azure-devops.azure-pipelines",
39+
"GitHub.copilot-chat",
40+
"GitHub.copilot",
41+
"mhutchie.git-graph",
42+
"streetsidesoftware.code-spell-checker",
43+
"streetsidesoftware.code-spell-checker-german",
44+
"streetsidesoftware.code-spell-checker-english",
45+
"fernandoescolar.vscode-solution-explorer"]
46+
}
47+
}
48+
49+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
50+
// "remoteUser": "root"
51+
}

0 commit comments

Comments
 (0)