Skip to content

Add a series of changes to make devcontainer experiences nicer for this repo #49867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@
"DOTNET_ROOT": "${containerWorkspaceFolder}/.dotnet",
"DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR": "${containerWorkspaceFolder}/.dotnet",
"NUGET_PACKAGES": "/home/vscode/.nuget/packages"
},
"remoteUser": "vscode",
"hostRequirements": {
"cpus": 16,
"memory": "32gb"
}
}
8 changes: 8 additions & 0 deletions .devcontainer/scripts/post-creation.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#! /usr/bin/env sh

# Install SDK and tool dependencies before container starts
# Also run the full restore on the repo so that go-to definition
# and other language features will be available in C# files
./restore.sh
# run the build so that everything is 'hot'
./build.sh -tl:off
# setup the IDE env to point to the local .dotnet folder so that assemblies/tools are loaded as expected
# this script is run from repo root so shellcheck warning about relative-path lookups can be ignored
# shellcheck disable=SC1091
. ./artifacts/sdk-build-env.sh
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100--dev${/}dotnet.dll",
"args": [
],
"env": {
"MSBuildExtensionsPath": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100-dev",
"MSBuildSDKsPath": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100-dev${/}Sdks",
"DOTNET_ROOT": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet",
},
"stopAtEntry": false,
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"requireExactSource": false
}
]
}
9 changes: 9 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"servers": {
"ms.docs": {
"url": "https://learn.microsoft.com/api/mcp",
"type": "http"
}
},
"inputs": []
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"dotnet.testWindow.disableAutoDiscovery": true,
"dotnet.defaultSolution": "sdk.slnx"
}