Vscode: Tasks "No build tasks defined" with `isBuildCommand`.

Created on 14 Apr 2017  路  15Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.11.2
  • OS Version: macOS 10.12.4

Steps to Reproduce:

  1. cmd+shift+b to build
  2. Observe
    screen shot 2017-04-14 at 11 18 42 am
  3. Click "Configure Build Task"
  4. Observe tasks.json. Is isBuildCommand not used elsewhere in tasks.json.
{
    "version": "2.0.0",
    "tasks": [
        {
            "taskName": "build",
            "isBuildCommand": true,
            "command": "cl",
            "isShellCommand": true,
            "args": ["cc", "-Wall", "-Wextra", "-Werror", "-g", "${fileDirname}/${fileBasename}", "${fileDirname}/${fileBasenameNoExtension}_test.c", "-o", "${fileDirname}/${fileBasenameNoExtension}_test"],
            "showOutput": "always",
            "dependsOn": "clean"
        },
snip...

Screenshot of Developer Tools (I don't know how to export console log for you):
screen shot 2017-04-14 at 11 18 28 am

needs more info tasks

Most helpful comment

Closing and reopening the window (without starting Code) resolves this issue.

All 15 comments

Closing and reopening the window (without starting Code) resolves this issue.

Yeah, that solved.
capture
Got the same here.

I think I have a better understanding the repo conditions here.

I have a lot of small projects, and I create symlinks for tasks.json and launch.json from my home directory, so I don't have to make or copy around a bunch.

The above error (No build task defined, but isBuildTask is defined) happens when I link the .vscode directory and attempt to build from a VS Code editor that was already open. It's as if there's some parsing of tasks.json that only happens on new windows.

I run this within the Integrated Terminal inside of my workspace...

function 42vscode {
  mkdir .vscode
  ln -s ~/Workspace/github/dotfiles/vscode/42_tasks.json .vscode/tasks.json
  ln -s ~/Workspace/github/dotfiles/vscode/42_launch.json .vscode/launch.json
  return 0
}

to make these links...

d09 (master) $ ls -l .vscode/
total 16
lrwxr-xr-x  1 wes  staff  58 Apr 13 18:17 launch.json -> /Users/wes/Workspace/github/dotfiles/vscode/42_launch.json
lrwxr-xr-x  1 wes  staff  57 Apr 13 18:17 tasks.json -> /Users/wes/Workspace/github/dotfiles/vscode/42_tasks.json

I am facing the same problem. It just started this morning. I am unable to build my projects using Ctrl+Shift+B. I keep receiving the same error even if I add "isBuildCommand" to the task.json:

capture

This is my version:

capture

Same problem, even if I have the isBuildCommand in the tasks.json

Same problem. Turn it on and off REALLY WORK! 馃槅

A restart fixed it for me, even if isBuildCommand is in tasks.json

There was a problem that the tasks.json didn't get reparsed after a change if not task has been started before. This is fixed for the next releases. However looks like that people get this even without editing the tasks.json.

I can't reproduce this neither with the new terminal nor with the old output runner. Here is what I see

cast

and with the new runner:

cast

Can someone provide a repository that I could clone to reproduce this.

As said the only case I can reproduce this is starting with no tasks.json.

cast

i started with no tasks.json (new project) and got this issue. restarting fixed.

@jasonswearingen this got fixes for the next update and doesn't require a restart anymore.

Looks like others might encounter this issue for a different reason, but since I'm the author...

There was a problem that the tasks.json didn't get reparsed after a change if not task has been started before.

This will likely resolve the issue. Thank you.

Can someone provide a repository that I could clone to reproduce this.

The issue (for me) is reproduced when starting with workspace without .vscode and it's contents, and then they're copied into place out of band (bash mv or cp existing tasks.json from another workspace).

@wgj I tested your scenario and it works for me on latest insider builds (e.g. copying files into a .vscode directory). I will close the issue since all problematic scenarios described are working for me on insider.

Just had the same problem again on the live build in a new project (actually, adding a build json to an existing nodejs project).
Again, restarting the editor solved.

@wkrueger this got addressed for the next upcoming build which will ship soon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ozsay picture ozsay  路  247Comments

misolori picture misolori  路  282Comments

Brakkar picture Brakkar  路  364Comments

jsftw86 picture jsftw86  路  361Comments

Tyriar picture Tyriar  路  187Comments