devcontainer.json 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
  2. // https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/dotnet
  3. {
  4. "name": "C# (.NET)",
  5. "build": {
  6. "dockerfile": "Dockerfile",
  7. "args": {
  8. // Options
  9. "INSTALL_NODE": "true",
  10. "NODE_VERSION": "lts/*"
  11. }
  12. },
  13. // Add the IDs of extensions you want installed when the container is created.
  14. "extensions": [
  15. "ms-dotnettools.csdevkit",
  16. "EditorConfig.EditorConfig",
  17. "k--kato.docomment",
  18. "dbaeumer.vscode-eslint"
  19. ],
  20. "settings": {
  21. // Loading projects on demand is better for larger codebases
  22. "omnisharp.enableMsBuildLoadProjectsOnDemand": true,
  23. "omnisharp.enableRoslynAnalyzers": true,
  24. "omnisharp.enableEditorConfigSupport": true,
  25. "omnisharp.enableImportCompletion": true,
  26. },
  27. // Use 'postCreateCommand' to run commands after the container is created.
  28. "onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh",
  29. // Add the locally installed dotnet to the path to ensure that it is activated
  30. // This is needed so that things like the C# extension can resolve the correct SDK version
  31. "remoteEnv": {
  32. "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
  33. "DOTNET_MULTILEVEL_LOOKUP": "0",
  34. "TARGET": "net9.0",
  35. "DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER": "true"
  36. },
  37. // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
  38. "remoteUser": "vscode",
  39. "hostRequirements": {
  40. "cpus": 8
  41. }
  42. }