зеркало из https://github.com/dotnet/razor.git
Razor Compiler Codespaces Support (#33)
* Support Codespaces for Razor Compiler * Fix target
This commit is contained in:
Родитель
952c29ce24
Коммит
1303a9edd8
|
@ -0,0 +1,5 @@
|
|||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/dotnet/.devcontainer/base.Dockerfile
|
||||
|
||||
# [Choice] .NET version: 6.0, 5.0, 3.1, 2.1
|
||||
ARG VARIANT="6.0"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/dotnet
|
|
@ -0,0 +1,42 @@
|
|||
// 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.177.0/containers/dotnet
|
||||
{
|
||||
"name": "C# (.NET)",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
// The VARIANT here must align with a dotnet container image that
|
||||
// is publicly available on https://mcr.microsoft.com/v2/vscode/devcontainers/dotnet/tags/list.
|
||||
// We'll default to `latest` as the default. Generally, the .NET version that is baked
|
||||
// into the image by default doesn't matter since we end up installing our own
|
||||
// local version and using that by default in the container environment.
|
||||
"VARIANT": "latest",
|
||||
// Options
|
||||
"INSTALL_NODE": "true",
|
||||
"NODE_VERSION": "lts/*"
|
||||
}
|
||||
},
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"ms-dotnettools.csharp",
|
||||
"EditorConfig.EditorConfig"
|
||||
],
|
||||
"settings": {
|
||||
// Loading projects on demand is better for larger codebases
|
||||
"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": "net6.0",
|
||||
},
|
||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
|
@ -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
|
||||
./restore.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
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"ms-dotnettools.csharp",
|
||||
"EditorConfig.EditorConfig"
|
||||
]
|
||||
}
|
|
@ -1,4 +1,11 @@
|
|||
{
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.associations": {
|
||||
"*.*proj": "xml",
|
||||
"*.props": "xml",
|
||||
"*.targets": "xml",
|
||||
"*.tasks": "xml"
|
||||
},
|
||||
"markdownlint.config": {
|
||||
"MD028": false,
|
||||
"MD025": {
|
||||
|
|
Загрузка…
Ссылка в новой задаче