Automatically run build_runner on VS Code startup, not working
See original GitHub issueAn issue for a problem, which came up in this issue: https://github.com/Dart-Code/Dart-Code/issues/1211#issuecomment-470621513
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:
- STRG + SHIFT + P
- Typed: “Tasks Configure Task” ENTER
- Selected, the Task I wanted to configure
- Modified generated task.json to the following (only added
"runOptions"
):
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: https://github.com/dart-lang/build/issues/1025#issuecomment-435993458
Any idea?
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (11 by maintainers)
Top Results From Across the Web
flutter pub run build_runner build failed - dart - Stack Overflow
I tried with many solutions, But error not gone. flutter packages pub run build_runner watch command ran with endless log.
Read more >Dart build_runner - Visual Studio Marketplace
Dart build_runner tools in VSCode. Installation. Launch VS Code Quick Open ( Ctrl+P ), paste the following command, and press enter.
Read more >Integrating Dart's Build Runner with VSCode
What about we run build_runner build after we save a, say, Dart file? That would be conveinent and also not resource draining solution....
Read more >VSCode Tasks and Code Generation after Save : r/FlutterDev
One strange behavior of build runner is that when it finds an already-generated file and needs to generate it again, it asks the...
Read more >Flutter For Web: A Complete Guide to Create & Run ... - ITNEXT
Note: if you have problems configuring webdev to run directly, try: ... run your app by pressing F5 or “Debug -> Start Debugging”;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think between a fix made in https://github.com/microsoft/vscode/issues/70303 and https://github.com/microsoft/vscode/issues/126238, this should be fixable now, though requires us to adopt the new
onTaskType:
activation event.Ok, I’m waiting to hear back on https://github.com/Microsoft/vscode/issues/70303 before doing any more on this. In my opinion this is a bug - it should not be necessary for an extension that uses tasks to have to activate whenever the user runs any task in VS Code (especially given they don’t seem to want to give us an activation reason).
I hope we could have a more restricted activation event (eg.
onTask:pub
).