diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..9378435c7 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +FROM mcr.microsoft.com/dotnet/sdk:10.0 + +# 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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1326700af..f1bf5641b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,7 @@ { - "image": "mcr.microsoft.com/dotnet/sdk:8.0" -} \ No newline at end of file + "name": "csharp", + "build": { + "dockerfile": "Dockerfile", + "context": "." + } +}