Using tasks.json
version 2.0.0, I have not been able to make it so that, when I build my application, multiple tasks are run at the same time. I'm using gulp for my SCSS compilation, and running my Compile/minify cms.scss
task on its own works fine, so it's not a problem with the task itself, just VS Code's task runner. When I Run Build Task
in VS Code, my gulp task is not being run, even though it has "group": "build"
— only the dotnet
one is.
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/HpsCoreWeb.csproj"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile/minify cms.scss",
"type": "gulp",
"task": "cms.scss:cms.min.css",
"problemMatcher": "$node-sass",
"group": "build"
}
]
}
According to the VS Code Tasks documentation:
group: Defines to which group the task belongs. In the example, it belongs to the
test
group. Tasks that belong to the test group can be executed by running Run Test Task from the Command Palette.
The dotnet build
task is succeeding, so shouldn't the other task, which is also part of the build
group, be run as well? What am I doing wrong?
dotnet build
depends ongulp1
, which depends ongulp2
, etc.) just to get them all to run? If it works, it works, but it's kind of astounding they don't simply have a way to asynchronously execute all tasks in a defined group without defining false dependencies. – Concertina