未验证 提交 2aea2440 编写于 作者: A Alexander Köplinger 提交者: GitHub

Improve DevContainer configuration for Codespaces (#91465)

Adds a default configuration that comes with all the dependencies preinstalled, but not prebuilt. This reduces confusion if you don't use the "New with options..." dropdown when creating the Codespace since you'd just get a standard Ubuntu container then.

Also install a specific version of dotnet-serve.
上级 f6b64151
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "Standard configuration",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0
"VARIANT": "6.0-jammy"
}
},
"hostRequirements": {
"cpus": 4,
"memory": "8gb"
},
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp"
],
"settings": {
// Loading projects on demand is better for larger codebases
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableAsyncCompletion": true,
"omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings"
}
}
},
// Add the locally installed dotnet to the path to ensure that it is activated
// This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
"remoteEnv": {
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
"DOTNET_MULTILEVEL_LOOKUP": "0"
},
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "C# (.NET)",
"name": "Libraries/Runtime development (prebuilt)",
"build": {
"dockerfile": "Dockerfile",
"dockerfile": "../Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0
"VARIANT": "6.0-jammy"
......
......@@ -19,7 +19,7 @@ case "$opt" in
./build.sh mono+libs -os browser -c Release
# install dotnet-serve for running wasm samples
./dotnet.sh tool install dotnet-serve --tool-path ./.dotnet-tools-global
./dotnet.sh tool install dotnet-serve --version 1.10.172 --tool-path ./.dotnet-tools-global
;;
esac
......
// For format details, see https://aka.ms/devcontainer.json.
{
"name": "C# (.NET)",
"name": "WASM development (prebuilt)",
"build": {
"dockerfile": "Dockerfile",
"args": {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册