Skip to content

Commit 15d4331

Browse files
committed
Add a series of changes to make devcontainer experiences nicer for the SDK repo.
* make devcontainer init script build the repo * source the sdk-build-env script so that the IDE experience uses the local SDK * setup simple launch configurations for debugging the redist CLI * disable the CDK test explorer auto-discovery because it takes _forever_ - trigger it once and then don't change anything instead
1 parent d4e9bbc commit 15d4331

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed
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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/artifacts\\bin\\redist\\Debug\\dotnet\\sdk\\10.0.100-dev\\dotnet.dll",
12+
"args": [
13+
],
14+
"env": {
15+
"MSBuildExtensionsPath": "${workspaceFolder}\\artifacts\\bin\\redist\\Debug\\dotnet\\sdk\\10.0.100-dev",
16+
"MSBuildSDKsPath": "${workspaceFolder}\\artifacts\\bin\\redist\\Debug\\dotnet\\sdk\\10.0.100-dev\\Sdks",
17+
"DOTNET_ROOT": "${workspaceFolder}\\artifacts\\bin\\redist\\Debug\\dotnet",
18+
},
19+
"stopAtEntry": false,
20+
"console": "integratedTerminal",
21+
"justMyCode": true
22+
},
23+
{
24+
"name": ".NET Core Attach",
25+
"type": "coreclr",
26+
"request": "attach",
27+
"requireExactSource": false
28+
}
29+
]
30+
}

.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dotnet.testWindow.disableAutoDiscovery": true
3+
}

0 commit comments

Comments
 (0)