Add VS Code support for tutorials (#322)

Fixes: #273

Adding tasks and launch configurations to allow running and debugging
tutorial projects directly from Visual Studio Code.
Newly added tasks also allow publishing tutorial projects and running
them under under the wather.

Verification:
- Ran each added launch configuration from VS Code
- Published a couple projects and made sure artificats were written to
  the expected location
- Ran a couple projects under the watcher
This commit is contained in:
Pawel Kadluczka 2020-11-05 11:43:07 -08:00 коммит произвёл GitHub
Родитель ca4b122298
Коммит 38cb04c7b5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 616 добавлений и 0 удалений

143
.vscode/launch.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,143 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Tutorial 1.1 - Hello Window",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 1.1 - Hello Window",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 1.1 - Hello Window/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.1 - Hello Window",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 1.2 - Hello quad",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 1.2 - Hello quad",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 1.2 - Hello quad/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.2 - Hello quad",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 1.3 - Abstractions",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 1.3 - Abstractions",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 1.3 - Abstractions/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.3 - Abstractions",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 1.4 - Textures",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 1.4 - Textures",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 1.4 - Textures/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.4 - Textures",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 1.5 - Transformations",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 1.5 - Transformations",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 1.5 - Transformations/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.5 - Transformations",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 2.1 - Co-ordinate Systems",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 2.1 - Co-ordinate Systems",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 2.1 - Co-ordinate Systems/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 2.1 - Co-ordinate Systems",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 2.2 - Camera",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 2.2 - Camera",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 2.2 - Camera/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 2.2 - Camera",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 3.1 - Ambient Lighting",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 3.1 - Ambient Lighting",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 3.1 - Ambient Lighting/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.1 - Ambient Lighting",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 3.2 - Diffuse Lighting",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 3.2 - Diffuse Lighting",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 3.2 - Diffuse Lighting/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.2 - Diffuse Lighting",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 3.3 - Specular Lighting",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 3.3 - Specular Lighting",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 3.3 - Specular Lighting/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.3 - Specular Lighting",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 3.4 - Materials",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 3.4 - Materials",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 3.4 - Materials/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.4 - Materials",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Tutorial 3.5 - Lighting Maps",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build Tutorial 3.5 - Lighting Maps",
"program": "${workspaceFolder}/examples/CSharp/Tutorial 3.5 - Lighting Maps/bin/Debug/netcoreapp3.0/Tutorial.dll",
"args": [],
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.5 - Lighting Maps",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}

473
.vscode/tasks.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,473 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build Tutorial 1.1 - Hello Window",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 1.1 - Hello Window/Tutorial 1.1 - Hello Window.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 1.1 - Hello Window",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 1.1 - Hello Window/Tutorial 1.1 - Hello Window.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 1.1 - Hello Window",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.1 - Hello Window"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 1.2 - Hello quad",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 1.2 - Hello quad",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 1.2 - Hello quad/Tutorial 1.2 - Hello quad.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 1.2 - Hello quad",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.2 - Hello quad"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 1.3 - Abstractions",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 1.3 - Abstractions/Tutorial 1.3 - Abstraction.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 1.3 - Abstractions",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 1.3 - Abstractions/Tutorial 1.3 - Abstraction.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 1.3 - Abstractions",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.3 - Abstractions"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 1.4 - Textures",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 1.4 - Textures/Tutorial 1.4 - Textures.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 1.4 - Textures",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 1.4 - Textures/Tutorial 1.4 - Textures.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 1.4 - Textures",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.4 - Textures"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 1.5 - Transformations",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 1.5 - Transformations/Tutorial 1.5 - Transformations.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 1.5 - Transformations",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 1.5 - Transformations/Tutorial 1.5 - Transformations.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 1.5 - Transformations",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 1.5 - Transformations"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 2.1 - Co-ordinate Systems",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 2.1 - Co-ordinate Systems/Tutorial 2.1 - Co-ordinate Systems.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 2.1 - Co-ordinate Systems",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 2.1 - Co-ordinate Systems/Tutorial 2.1 - Co-ordinate Systems.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 2.1 - Co-ordinate Systems",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 2.1 - Co-ordinate Systems"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 2.2 - Camera",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 2.2 - Camera/Tutorial 2.2 - Camera.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 2.2 - Camera",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 2.2 - Camera/Tutorial 2.2 - Camera.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 2.2 - Camera",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 2.2 - Camera"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 3.1 - Ambient Lighting",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 3.1 - Ambient Lighting/Tutorial 3.1 - Ambient Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 3.1 - Ambient Lighting",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 3.1 - Ambient Lighting/Tutorial 3.1 - Ambient Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 3.1 - Ambient Lighting",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.1 - Ambient Lighting"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 3.2 - Diffuse Lighting",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 3.2 - Diffuse Lighting/Tutorial 3.2 - Diffuse Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 3.2 - Diffuse Lighting",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 3.2 - Diffuse Lighting/Tutorial 3.2 - Diffuse Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 3.2 - Diffuse Lighting",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.2 - Diffuse Lighting"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 3.3 - Specular Lighting",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 3.3 - Specular Lighting/Tutorial 3.3 - Specular Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 3.3 - Specular Lighting",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 3.3 - Specular Lighting/Tutorial 3.3 - Specular Lighting.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 3.3 - Specular Lighting",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.3 - Specular Lighting"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 3.4 - Materials",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 3.4 - Materials/Tutorial 3.4 - Materials.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 3.4 - Materials",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 3.4 - Materials/Tutorial 3.4 - Materials.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 3.4 - Materials",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.4 - Materials"
},
"problemMatcher": "$msCompile"
},
{
"label": "build Tutorial 3.5 - Lighting Maps",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/examples/CSharp/Tutorial 3.5 - Lighting Maps/Tutorial 3.5 - Lighting Maps.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish Tutorial 3.5 - Lighting Maps",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/examples/CSharp/Tutorial 3.5 - Lighting Maps/Tutorial 3.5 - Lighting Maps.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch Tutorial 3.5 - Lighting Maps",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"options": {
"cwd": "${workspaceFolder}/examples/CSharp/Tutorial 3.5 - Lighting Maps"
},
"problemMatcher": "$msCompile"
}
]
}