diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 982603ef0a6d..eefdb6bfe9e9 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,6 +18,11 @@ "ms-dotnettools.csharp" ], + "settings": { + // Loading projects on demand is better for larger codebases + "omnisharp.enableMsBuildLoadProjectsOnDemand": true + }, + // Use 'postCreateCommand' to run commands after the container is created. "onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh", diff --git a/.devcontainer/scripts/container-creation.sh b/.devcontainer/scripts/container-creation.sh index db10b7845e33..7b474d51aa95 100644 --- a/.devcontainer/scripts/container-creation.sh +++ b/.devcontainer/scripts/container-creation.sh @@ -6,4 +6,6 @@ set -e # the repo directory on the container so we do this post-create git submodule update --init --recursive # Install SDK and tool dependencies before container starts -./eng/build.sh --only-build-repo-tasks +# 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