From 89c33bc728fbbdd957659bbb8c3e36ec89d4f84f Mon Sep 17 00:00:00 2001 From: Jonas Dellinger Date: Thu, 26 Mar 2020 18:33:45 +0100 Subject: [PATCH] Added launch/build support for examples --- .vscode/launch.json | 74 ++++++++++++++++++++++++--------------------- .vscode/tasks.json | 69 +++++++++++++++++------------------------- 2 files changed, 67 insertions(+), 76 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 09e427d9..0e684b92 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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}" - } - ] -} \ No newline at end of file + // 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 + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8217097c..907a4848 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -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" - } - ] -} \ No newline at end of file + "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" + }, + ] +}