-
Notifications
You must be signed in to change notification settings - Fork 133
feat : Add CodeSpaces support #892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/dotnet/.devcontainer/base.Dockerfile | ||
|
|
||
| # [Choice] .NET version: 6.0, 3.1, 6.0-bullseye, 3.1-bullseye, 6.0-focal, 3.1-focal | ||
| ARG VARIANT="6.0-bullseye-slim" | ||
| FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} | ||
|
|
||
| # [Choice] Node.js version: none, lts/*, 18, 16, 14 | ||
| ARG NODE_VERSION="none" | ||
| RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
|
||
| # [Optional] Uncomment this section to install additional OS packages. | ||
| # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
| # && apt-get -y install --no-install-recommends <your-package-list-here> | ||
|
|
||
| # [Optional] Uncomment this line to install global node packages. | ||
| # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
| // https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/dotnet | ||
| { | ||
| "name": "C# (.NET)", | ||
| "build": { | ||
| "dockerfile": "Dockerfile", | ||
| "args": { | ||
| // Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0 | ||
| // Append -bullseye or -focal to pin to an OS version. | ||
| "VARIANT": "6.0-bullseye", | ||
| // Options | ||
| "NODE_VERSION": "none" | ||
| } | ||
| }, | ||
| // 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", | ||
| "EditorConfig.EditorConfig", | ||
| "k--kato.docomment" | ||
| ], | ||
| "settings": { | ||
| "omnisharp.enableMsBuildLoadProjectsOnDemand": true, | ||
| "omnisharp.enableRoslynAnalyzers": true, | ||
| "omnisharp.enableEditorConfigSupport": true, | ||
| "omnisharp.enableImportCompletion": true, | ||
| } | ||
| } | ||
| }, | ||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| "onCreateCommand": "bash -i ${containerWorkspaceFolder}/.devcontainer/scripts/container-creation.sh", | ||
| // Add the locally installed dotnet to the path to ensure that it is activated | ||
| // This is needed so that things like the C# extension can resolve the correct SDK version | ||
| "remoteEnv": { | ||
| "PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}", | ||
| "DOTNET_MULTILEVEL_LOOKUP": "0", | ||
| "TARGET": "net7.0", | ||
| "DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER": "true" | ||
| }, | ||
| "remoteUser": "vscode" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| # Install SDK and tool dependencies before container starts | ||
| # Also run the full restore on the repo so that go-to definition | ||
| # and other language features will be available in C# files | ||
| ./build.sh | ||
|
|
||
| # The container creation script is executed in a new Bash instance | ||
| # so we exit at the end to avoid the creation process lingering. | ||
| exit | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,6 @@ | |
| *.suo | ||
| *.user | ||
| .vs/ | ||
| .vscode/ | ||
|
|
||
| # Build results | ||
| artifacts/ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "Restore projects", | ||
| "type": "shell", | ||
| "command": "./restore.sh", | ||
| "windows": { | ||
| "command": ".\\restore.cmd" | ||
| }, | ||
| "group": "build", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "new" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Build entire repository", | ||
| "type": "shell", | ||
| "command": "./build.sh", | ||
| "windows": { | ||
| "command": ".\\build.cmd" | ||
| }, | ||
| "group": "build", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "new" | ||
| } | ||
| }, | ||
| { | ||
| "label": "Run all test projects", | ||
| "type": "shell", | ||
| "command": "./test.sh", | ||
| "windows": { | ||
| "command": ".\\test.cmd" | ||
| }, | ||
| "group": "test", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "new" | ||
| } | ||
| }, | ||
| ] | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.