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.208.0/containers/dotnet
3+ {
4+ "name" : " C# (.NET)" ,
5+ "build" : {
6+ "dockerfile" : " Dockerfile" ,
7+ "args" : {
8+ // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
9+ // Append -bullseye or -focal to pin to an OS version.
10+ "VARIANT" : " 6.0" ,
11+ // Options
12+ "NODE_VERSION" : " lts/*"
13+ }
14+ },
15+ // Set *default* container specific settings.json values on container create.
16+ "settings" : {},
17+ // Add the IDs of extensions you want installed when the container is created.
18+ "extensions" : [
19+ " ms-dotnettools.csharp" ,
20+ " unoplatform.vscode" ,
21+ " ms-vsliveshare.vsliveshare" ,
22+ " ms-vscode.powershell"
23+ ],
24+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
25+ "forwardPorts" : [
26+ 5000 ,
27+ 5001
28+ ],
29+
30+ "appPort" : [
31+ 5000 ,
32+ 5001
33+ ],
34+ // [Optional] To reuse of your local HTTPS dev cert:
35+ //
36+ // 1. Export it locally using this command:
37+ // * Windows PowerShell:
38+ // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
39+ // * macOS/Linux terminal:
40+ // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
41+ //
42+ // 2. Uncomment these 'remoteEnv' lines:
43+ // "remoteEnv": {
44+ // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
45+ // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
46+ // },
47+ //
48+ // 3. Do one of the following depending on your scenario:
49+ // * When using GitHub Codespaces and/or Remote - Containers:
50+ // 1. Start the container
51+ // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
52+ // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
53+ //
54+ // * If only using Remote - Containers with a local container, uncomment this line instead:
55+ // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ],
56+ // Use 'postCreateCommand' to run commands after the container is created.
57+ // "postCreateCommand": "dotnet restore",
58+ "postCreateCommand" : " dotnet dev-certs https --trust" ,
59+ // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
60+ "remoteUser" : " vscode" ,
61+ "features" : {
62+ "powershell" : " latest"
63+ },
64+ "portsAttributes" : {
65+ "5000" : {
66+ "label" : " WebAssembly App" ,
67+ "onAutoForward" : " openPreview"
68+ }
69+ }
70+ }
0 commit comments