I have a build.bat file for which I would like VS Code to run when I try and build my project. To do this in VS Code you setup a task.json file and I've done so:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"windows": {
"command": "${workspaceRoot}\\build.bat"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
The problem I'm having is each time I run the task it seems to generate a new terminal instance. Is there a way to have VS Code keep re-using the same terminal instance for its build tasks?
You can use the :
terminal.integrated.automationShell
Setting to set the shell that will be used for all automation in VS Code, which includes Tasks
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