Skip to content

Commit ee6cd03

Browse files
authored
Add a series of changes to make devcontainer experiences nicer for this repo (#49867)
2 parents 2819cf0 + b4316f0 commit ee6cd03

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,10 @@
2727
"DOTNET_ROOT": "${containerWorkspaceFolder}/.dotnet",
2828
"DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR": "${containerWorkspaceFolder}/.dotnet",
2929
"NUGET_PACKAGES": "/home/vscode/.nuget/packages"
30+
},
31+
"remoteUser": "vscode",
32+
"hostRequirements": {
33+
"cpus": 16,
34+
"memory": "32gb"
3035
}
3136
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
#! /usr/bin/env sh
2+
13
# Install SDK and tool dependencies before container starts
24
# Also run the full restore on the repo so that go-to definition
35
# and other language features will be available in C# files
46
./restore.sh
7+
# run the build so that everything is 'hot'
8+
./build.sh -tl:off
9+
# setup the IDE env to point to the local .dotnet folder so that assemblies/tools are loaded as expected
10+
# this script is run from repo root so shellcheck warning about relative-path lookups can be ignored
11+
# shellcheck disable=SC1091
12+
. ./artifacts/sdk-build-env.sh

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": ".NET Core Launch (console)",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"program": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100--dev${/}dotnet.dll",
9+
"args": [
10+
],
11+
"env": {
12+
"MSBuildExtensionsPath": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100-dev",
13+
"MSBuildSDKsPath": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet${/}sdk${/}10.0.100-dev${/}Sdks",
14+
"DOTNET_ROOT": "${workspaceFolder}${/}artifacts${/}bin${/}redist${/}Debug${/}dotnet",
15+
},
16+
"stopAtEntry": false,
17+
"console": "integratedTerminal",
18+
"justMyCode": true
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach",
24+
"requireExactSource": false
25+
}
26+
]
27+
}

.vscode/mcp.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"servers": {
3+
"ms.docs": {
4+
"url": "https://learn.microsoft.com/api/mcp",
5+
"type": "http"
6+
}
7+
},
8+
"inputs": []
9+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"dotnet.testWindow.disableAutoDiscovery": true,
3+
"dotnet.defaultSolution": "sdk.slnx"
4+
}

0 commit comments

Comments
 (0)