Skip to content

Commit 968e667

Browse files
authored
Improve Codespaces + C# extension interaction (#33614)
1 parent 4fc4748 commit 968e667

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
"ms-dotnettools.csharp"
1919
],
2020

21+
"settings": {
22+
// Loading projects on demand is better for larger codebases
23+
"omnisharp.enableMsBuildLoadProjectsOnDemand": true
24+
},
25+
2126
// Use 'postCreateCommand' to run commands after the container is created.
2227
"onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh",
2328

.devcontainer/scripts/container-creation.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ set -e
66
# the repo directory on the container so we do this post-create
77
git submodule update --init --recursive
88
# Install SDK and tool dependencies before container starts
9-
./eng/build.sh --only-build-repo-tasks
9+
# Also run the full restore on the repo so that go-to definition
10+
# and other language features will be available in C# files
11+
./restore.sh

0 commit comments

Comments
 (0)