Skip to content

Commit 8545f16

Browse files
committed
Upgrades .NET devcontainer to noble and cleans obj/bin
Updates the .NET devcontainer image to use the noble distribution. Adds a post-create command to clean up obj and bin directories and restore dotnet dependencies, ensuring a clean build environment.
1 parent cd45c7e commit 8545f16

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
33
{
4-
"name": "C# (.NET)",
4+
"name": "C# (.NET 10)",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/dotnet:1-10.0-bookworm",
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-10.0-noble",
77
"features": {
88
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
99
"ghcr.io/devcontainers/features/dotnet:2": {},
1010
"ghcr.io/devcontainers/features/github-cli:1": {},
1111
"ghcr.io/azure/azure-dev/azd:0": {},
1212
"ghcr.io/dotnet/aspire-devcontainer-feature/dotnetaspire:1": {}
13-
}
13+
},
1414

1515
// Features to add to the dev container. More info: https://containers.dev/features.
1616
// "features": {},
@@ -24,7 +24,7 @@
2424
// }
2525

2626
// Use 'postCreateCommand' to run commands after the container is created.
27-
// "postCreateCommand": "dotnet restore",
27+
"postCreateCommand": "cd src && find . -type d -name 'obj' -o -name 'bin' | xargs rm -rf && dotnet restore"
2828

2929
// Configure tool-specific properties.
3030
// "customizations": {},

0 commit comments

Comments
 (0)