diff --git a/.vscode/launch.json b/.vscode/launch.json index 0e948929138..b8e4600a6de 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,10 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": ".NET Core Launch (console) - net6.0", + "name": ".NET Core Launch (console debug) - net6.0", "type": "coreclr", "request": "launch", - "preLaunchTask": "Web App: Dotnet Build Debug - net6.0", + "preLaunchTask": "dotnet build (debug) - net6.0", "program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net6.0/OrchardCore.Cms.Web.dll", "args": [], "cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web", @@ -19,7 +19,7 @@ "type": "coreclr", "request": "launch", "internalConsoleOptions": "openOnSessionStart", - "preLaunchTask": "Web App: Dotnet Build Debug - net6.0", + "preLaunchTask": "dotnet build (debug) - net6.0", "program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Debug/net6.0/OrchardCore.Cms.Web.dll", "args": [], "cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web", @@ -36,7 +36,7 @@ "name": ".NET Core Launch (web release) - net6.0", "type": "coreclr", "request": "launch", - "preLaunchTask": "Web App: Dotnet Build Release - net6.0", + "preLaunchTask": "dotnet build (release) - net6.0", "program": "${workspaceRoot}/src/OrchardCore.Cms.Web/bin/Release/net6.0/OrchardCore.Cms.Web.dll", "args": [], "cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web", @@ -50,23 +50,17 @@ } }, { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - }, - { - "name": ".NET Core Launch (publish framework dependent) - net6.0", - "type": "coreclr", + "name": ".NET Core Launch (web debug) - dotnet watch - net6.0", + "type": "dotnetwatchattach", "request": "launch", - "internalConsoleOptions": "openOnSessionStart", - "preLaunchTask": "Web App: Dotnet Publish (framework dependent) - net6.0", - "program": "${workspaceRoot}/.build/release/OrchardCore.Cms.Web.dll", - "args": [], - "cwd": "${workspaceRoot}/.build/release", - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" + "task": "dotnet watch - net6.0", + "program": "OrchardCore.Cms.Web.exe", + "args": { + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + } }, + "cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web", "stopAtEntry": false, "serverReadyAction": { "action": "openExternally", @@ -74,22 +68,10 @@ } }, { - "name": ".NET Core Launch (publish self-contained) - net6.0", - "type": "coreclr", - "request": "launch", - "internalConsoleOptions": "openOnSessionStart", - "preLaunchTask": "Web App: Dotnet Publish (self-contained) - net6.0", - "program": "${workspaceRoot}/.build/release/OrchardCore.Cms.Web.dll", - "args": [], - "cwd": "${workspaceRoot}/.build/release", - "env": { - "ASPNETCORE_ENVIRONMENT": "Development" - }, - "stopAtEntry": false, - "serverReadyAction": { - "action": "openExternally", - "pattern": "\\bNow listening on:\\s+(https?://\\S+)" - } + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" }, { "name": "Gulp Debug", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6c332a2dfc0..55d43018162 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -24,7 +24,35 @@ }, "tasks": [ { - "label": "Dotnet Restore", + "label": "dotnet watch - net6.0", + "type": "process", + "command": "dotnet", + "args": [ + "watch", + "run", + "${workspaceRoot}/src/OrchardCore.Cms.Web", + "-f", + "net6.0" + ], + "options": { + "cwd": "${workspaceRoot}/src/OrchardCore.Cms.Web" + }, + "problemMatcher": "$msCompile" + }, + { + "label": "dotnet run", + "type": "shell", + "command": "dotnet", + "args": [ + "run", + "--project", + "${workspaceRoot}\\src\\OrchardCore.Cms.Web\\OrchardCore.Cms.Web.csproj", + "-f", + "net6.0" + ] + }, + { + "label": "dotnet restore", "type": "shell", "command": "dotnet", "args": [ @@ -32,7 +60,7 @@ ] }, { - "label": "Dotnet Restore Force", + "label": "dotnet restore force", "type": "shell", "command": "dotnet", "args": [ @@ -41,7 +69,7 @@ ] }, { - "label": "Dotnet clean (debug)", + "label": "dotnet clean (debug)", "type": "shell", "command": "dotnet", "args": [ @@ -51,7 +79,7 @@ ] }, { - "label": "Dotnet clean (release)", + "label": "dotnet clean (release)", "type": "shell", "command": "dotnet", "args": [ @@ -61,7 +89,7 @@ ] }, { - "label": "Web App: Dotnet Build Debug - net6.0", + "label": "dotnet build (debug) - net6.0", "type": "shell", "command": "dotnet", "args": [ @@ -75,42 +103,51 @@ "problemMatcher": "$msCompile" }, { - "label": "Web App: Dotnet Rebuild Debug - net6.0", + "label": "dotnet build (release) - net6.0", "type": "shell", "command": "dotnet", "args": [ "build", "${workspaceRoot}/src/OrchardCore.Cms.Web", - "--no-incremental", "-c", - "Debug", + "Release", "-f", "net6.0" ], "problemMatcher": "$msCompile" }, { - "label": "Web App: Dotnet Build Release - net6.0", + "label": "dotnet rebuild (debug) - net6.0", "type": "shell", "command": "dotnet", "args": [ "build", "${workspaceRoot}/src/OrchardCore.Cms.Web", + "--no-incremental", "-c", - "Release", + "Debug", "-f", "net6.0" ], "problemMatcher": "$msCompile" }, { - "label": "Web App: Dotnet Run", + "label": "dotnet rebuild (release) - net6.0", + "type": "shell", + "command": "dotnet", "args": [ - "cd ${workspaceRoot}/src/OrchardCore.Cms.Web & dotnet run" - ] + "build", + "${workspaceRoot}/src/OrchardCore.Cms.Web", + "--no-incremental", + "-c", + "Release", + "-f", + "net6.0" + ], + "problemMatcher": "$msCompile" }, { - "label": "Cleanup build folder", + "label": "cleanup publish folder", "type": "shell", "command": "rm", "windows": { @@ -126,7 +163,7 @@ ] }, { - "label": "Dotnet Publish (self-contained) - net6.0", + "label": "dotnet publish (self-contained) - release - net6.0", "type": "shell", "command": "dotnet", "windows": { @@ -161,7 +198,7 @@ "problemMatcher": "$msCompile" }, { - "label": "Dotnet Publish (framework dependent) - net6.0", + "label": "dotnet publish (framework dependent) - release - net6.0", "type": "shell", "command": "dotnet", "windows": { @@ -198,23 +235,25 @@ "problemMatcher": "$msCompile" }, { - "label": "Web App: Dotnet Publish (self-contained) - net6.0", + "label": "tasks: dotnet publish release (self-contained) - net6.0", "dependsOn": [ - "Cleanup build folder", - "Dotnet Publish (self-contained) - net6.0" + "cleanup publish folder", + "dotnet publish (self-contained) - net6.0" ] }, { - "label": "Web App: Dotnet Publish (framework dependent) - net6.0", + "label": "tasks: dotnet publish release (framework dependent) - net6.0", "dependsOn": [ - "Cleanup build folder", - "Dotnet Publish (framework dependent) - net6.0" + "cleanup publish folder", + "dotnet publish (framework dependent) - net6.0" ] }, { - "label": "Gulp Build", + "label": "gulp build", + "type": "shell", + "command": "gulp", "args": [ - "gulp build" + "build" ], "problemMatcher": "$gulp-tsc" }