I am developing some embedded code using VSCode as my IDE. I have created a workspace and I have two projects in it. When I have only a single project I can create my build and launch files, however, what I would like to do is to have build tasks and launch configurations for the whole workspace.
I have tried to manually create a ".vscode" folder in the workspace and added a tasks.json to it. However, when I select build VSCode is not presenting the tasks in the tasks.json file as options. It says there are no build tasks defined.
The VSCode documentation seems to suggest it is possible to have workspace-level build tasks, however I have failed to find how to configure those.
As for VSCode version 1.17.0 one can easily create workspace-level tasks by selecting "Open Workspace Tasks" from the Command Palette
Good question, as I just found out the GUI of VSCode is not very helpful. To create a tasks.json go to Terminal / Configure Tasks... and select Create tasks.json from template... this will create a .vscode folder and a tasks.json file in it. Unfortunately this is not want you want, instead the tasks should logicly be created in the workspace file. But what you could do is take the created tasks.json contents cut and paste it to the .workspace file.
Or you could open the .workspace file after the "folders" section type a comma, newline and start typing ta VSCode will autocomplete this with a tasks section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With