Skip to content

Instantly share code, notes, and snippets.

@kasuken
Created November 14, 2023 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasuken/01c07c497a7841875e393e4530c078db to your computer and use it in GitHub Desktop.
Save kasuken/01c07c497a7841875e393e4530c078db to your computer and use it in GitHub Desktop.
GitHub Codespaces devcontainer.json for .NET 8
{
"name": ".NET 8.0",
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/azure/azure-dev/azd:0": {
"version": "latest"
},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "none",
"dotnetRuntimeVersions": "7.0",
"aspNetCoreRuntimeVersions": "7.0"
}
},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.vscode-node-azure-pack",
"GitHub.vscode-github-actions",
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csdevkit",
"ms-dotnetools.csharp"
]
}
},
"forwardPorts": [
44380
],
"postCreateCommand": "cd ./demo001 && dotnet restore",
"hostRequirements": {
"memory": "8gb",
"cpus": 4
},
"remoteEnv": {
"DOTNET_MULTILEVEL_LOOKUP": "0",
"TARGET": "net8.0"
},
"portsAttributes": {
"44380": {
"label": "App",
"onAutoForward": "notify"
}
}
}
@kasuken
Copy link
Author

kasuken commented Nov 14, 2023

replace demo001 and the port with your values for the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment