Can task.dependsOn be used to depend on tasks in other projects #7092
-
Hi All, I have a multi root workspace with several projects in it. Each project has its own build task that calls an external script to do the build. One project requires all the others to be built prior to it's build as it is required to link against them. I will call this the "app" project from now on. I have tried using the dependsOn in the app's tasks.json build config, but referencing the name of the external build tasks has no effect if a command is specified, and throws an error if no command is specified. e.g:
Gives the error, even though the task 'devices' does exist and works in another tasks.json file:
Now that suggests it is not searching outside the current workspace folder, so I tried creating a top level "workspace" tasks in the .code-workspace file and referencing the build tasks in there:
This results in a similar error:
Now that looks like the it is not searching outside the .code-workspace file. I can with a little bit of trickery get it to work the way I want, but I have to specify all the tasks in the
That is all kind of OK, as I can now do what I want and create a build dependency but the task definitions are not in the correct place. They are all in the I checked the tasks.json Schema at https://code.visualstudio.com/docs/editor/tasks-appendix to see if there were extra parameters you can set on the Is there are way to configure the tasks in the individual project Where can I find the full schema for the tasks.json file? Or the code that is used to read this file in? Simon. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I found a feature request at microsoft/vscode#106940 that got closed due to not enough upvotes, so it looks like it's not supported. The discussion at microsoft/vscode-docs#2480 recommends not looking at the schema. There's some more info at https://code.visualstudio.com/Docs/editor/tasks . |
Beta Was this translation helpful? Give feedback.
I found a feature request at microsoft/vscode#106940 that got closed due to not enough upvotes, so it looks like it's not supported.
The discussion at microsoft/vscode-docs#2480 recommends not looking at the schema. There's some more info at https://code.visualstudio.com/Docs/editor/tasks .