Added launch/build support for examples

This commit is contained in:
Jonas Dellinger 2020-03-26 18:33:45 +01:00
parent c39201104c
commit 89c33bc728
2 changed files with 67 additions and 76 deletions

74
.vscode/launch.json vendored
View File

@ -1,36 +1,40 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/bin/Debug/netcoreapp3.0/SpotifyAPI.Web.Examples.ASP.dll",
"args": [],
"cwd": "${workspaceFolder}/SpotifyAPI.Web.Examples.ASP",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": "Launch SpotifyAPI.Web.Examples.ASP",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-web-example-asp",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/bin/Debug/netcoreapp3.0/SpotifyAPI.Web.Examples.ASP.dll",
"args": [],
"cwd": "${workspaceFolder}/SpotifyAPI.Web.Examples.ASP",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": "Launch SpotifyAPI.Web.Examples.CLI",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-web-example-cli",
"program": "${workspaceFolder}/SpotifyAPI.Web.Examples.CLI/bin/Debug/netcoreapp3.0/SpotifyAPI.Web.Examples.CLI.dll",
"args": [],
"cwd": "${workspaceFolder}/SpotifyAPI.Web.Examples.CLI",
"stopAtEntry": false
}
]
}

69
.vscode/tasks.json vendored
View File

@ -1,42 +1,29 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/SpotifyAPI.Web.Examples.ASP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/SpotifyAPI.Web.Examples.ASP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/SpotifyAPI.Web.Examples.ASP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}
"version": "2.0.0",
"tasks": [
{
"label": "build-web-example-asp",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/SpotifyAPI.Web.Examples.ASP/SpotifyAPI.Web.Examples.ASP.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-web-example-cli",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/SpotifyAPI.Web.Examples.CLI/SpotifyAPI.Web.Examples.CLI.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
]
}