vscode: Task detection errors

While verifying https://github.com/Microsoft/vscode/issues/45816

  • Disable all task autodetction
    "typescript.tsc.autoDetect": "off",
    "jake.autoDetect": "off",
    "gulp.autoDetect": "off",
    "npm.autoDetect": "off",
    "grunt.autoDetect": "off"
  • Type task in quickopen.
  • Get lots of errors like Error: The gulp task detection didn't contribute a task for the following configuration: ... and I can’t select those tasks

Maybe I just misunderstand what “autodetect” is. I would assume it just powers the detection of tasks in package.json, gulpfile.js, etc, that aren’t configured in a tasks.json. But if I try to execute a configured task of type “gulp”, I should still be able to run it using the gulp command.

If that’s not right, then what is the point of disabling autodetect?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 16 (9 by maintainers)

Most upvoted comments

So here’s the thing…

It’s very common to have a package.json defining a few primary scripts that you may run, and several child-scripts, that are only intended to be run by one of the primary scripts.

It would be really handy if we could disable task auto-detection, and configure only the primary scripts as tasks in tasks.json. That way, we won’t see all the child scripts.

Right now, my tasks list is a complete and utter mess because of this, so I’d really appreciate a solution to it. Maybe have an option to, instead of completely disabling task detection, just use the tasks.json file as a filter, and show only the configured tasks?

Oh, and yeah - that error message about task contribution needs to be improved. I really expected this to work, and was quite surprised by that strange error - I mean, I thought I had explicitly told it to not auto-detect, because I’d rather configure the tasks myself…