Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace Default Build Task doesn't seem to work when a User Default Build Task has already been defined #134605

Closed
pied2porc opened this issue Oct 7, 2021 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Milestone

Comments

@pied2porc
Copy link

Issue Type: Bug

I've set a User Default Build Task with those lines:

"group": {
    "kind": "build",
    "isDefault": true
}

so that I can press ctrl+shit+B to launch the compiler and skip the annoying drop down menu.
But when I configure a Workspace Default Build Task and press the shortcut, it only launches the User's task and ignores the Workspace settings.
The only way I've found to make it work is to not set the build task to default in the User's file, which is annoying because I'm losing the default configuration for projects relying on the User's settings.
Any workaround? or am I doing something wrong?

VS Code version: Code 1.60.2 (7f6ab54, 2021-09-22T12:00:31.514Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

@alexr00 alexr00 added bug Issue identified by VS Code Team member as probable bug tasks Task system issues labels Oct 15, 2021
@alexr00 alexr00 added this to the November 2021 milestone Oct 15, 2021
@alexr00
Copy link
Member

alexr00 commented Nov 3, 2021

If you have multiple isDefault build tasks, then we should be showing you a picker to choose which build task you want.

@alexr00
Copy link
Member

alexr00 commented Nov 3, 2021

On second thought, if you have one isDefault build task in your folder tasks.json and one in your user tasks.json, we should just run the one in your folder tasks.json.

Similarly, if you have one isDefault build tasks in your workspace file and one in your user tasks.json we should just run the one in your workspace file.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 1, 2021

/verified

Folder trumps user.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@rchiodo @alexr00 @pied2porc and others