Skip to content

Automatically run build_runner on VS Code startup, not working #1516

@HerrNiklasRaab

Description

@HerrNiklasRaab

An issue for a problem, which came up in this issue: #1211 (comment)

Here is my project: intersect.zip

@DanTup Yes, at least sort of.

I wanted to start the watch task as soon as I open VS Code. So I did the following:

  1. STRG + SHIFT + P
  2. Typed: "Tasks Configure Task" ENTER
  3. Selected, the Task I wanted to configure
  4. Modified generated task.json to the following (only added "runOptions"):

image

Now there is a warning:

Incorrect type. Expected "object".

And when I restart Visual Studio I get an error notification and following output:

Error: The pub task detection didn't contribute a task for the following configuration:
{
"type": "pub",
"command": "watch",
"problemMatcher": [
"dart-pub-build_runner"
],
"runOptions": {
"runOn": "folderOpen"
}
}
The task will be ignored.

Similar to this one:
dart-lang/build#1025 (comment)

Any idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    in tasksRelates to VS Code tasks, such as those provided by Task Providersis enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions