Skip to content

Commit 65e26e3

Browse files
authored
Merge pull request #7519 from dotnet/dev/jorobich/devcontainer
Added a devcontainer to make the contributing experience easier.
2 parents ac41ac1 + f92b739 commit 65e26e3

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile
2+
3+
FROM mcr.microsoft.com/dotnet/sdk:8.0
4+
5+
# Set up machine requirements to build the repo
6+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
7+
&& apt-get -y install --no-install-recommends curl git gnupg \
8+
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
9+
&& apt-get install -y nodejs

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.140.1/containers/dotnetcore
3+
{
4+
"name": "vscode-csharp",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
// Set the context to the workspace folder to allow us to copy files from it.
8+
"context": ".."
9+
},
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"files.associations": {
14+
"*.csproj": "msbuild",
15+
"*.fsproj": "msbuild",
16+
"*.globalconfig": "ini",
17+
"*.manifest": "xml",
18+
"*.nuspec": "xml",
19+
"*.pkgdef": "ini",
20+
"*.projitems": "msbuild",
21+
"*.props": "msbuild",
22+
"*.resx": "xml",
23+
"*.rsp": "Powershell",
24+
"*.ruleset": "xml",
25+
"*.settings": "xml",
26+
"*.shproj": "msbuild",
27+
"*.slnf": "json",
28+
"*.targets": "msbuild",
29+
"*.vbproj": "msbuild",
30+
"*.vsixmanifest": "xml",
31+
"*.vstemplate": "xml",
32+
"*.xlf": "xml",
33+
"*.yml": "azure-pipelines"
34+
},
35+
// ms-vscode.powershell settings
36+
"powershell.promptToUpdatePowerShell": false,
37+
"powershell.integratedConsole.showOnStartup": false,
38+
"powershell.startAutomatically": false,
39+
// ms-azure-devops.azure-pipelines settings
40+
"azure-pipelines.customSchemaFile": ".vscode/dnceng-schema.json"
41+
},
42+
"extensions": [
43+
"ms-dotnettools.csharp",
44+
"ms-dotnettools.csdevkit",
45+
"EditorConfig.EditorConfig",
46+
"ms-vscode.powershell",
47+
"tintoy.msbuild-project-tools",
48+
"ms-azure-devops.azure-pipelines",
49+
"dbaeumer.vscode-eslint",
50+
"esbenp.prettier-vscode",
51+
"orta.vscode-jest"
52+
]
53+
}
54+
},
55+
"postCreateCommand": "npm ci && npx gulp installDependencies"
56+
}

.devcontainer/devinit.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"run": [
3+
{
4+
"tool": "require-dotnetcoresdk"
5+
}
6+
]
7+
}

.vscode/dneng-schema.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)