Extension activated on Show Tasks/Run Build Task even if not in a CMake project
See original GitHub issueBrief Issue Summary
When working on non CMake projects and using the “Tasks: Run Build Task” or simply “Show tasks” command, the cmake extension activates automatically asking to choose a kit, creating a new view and filling the statusbar with useless information (since there is no CMake project)
Expected:
For a non CMake project I would expect that even though I run the “Build” task, the extension wouldn’t turn on.
Other Notes/Information
Looking at the package.json I can see that one of the activation events is onCommand:workbench.action.tasks.runTask. This suggests to me that the originally desired behaviour was:
- User asks to show tasks
- Register a cmake task provider in case there were any tasks to provide
However i think that this activation event should be removed, leading to the following new behaviour:
- If there is some reason to activate cmake on folder open (e.g. CMakeLists.txt present) load the full cmake extension (which is the actual behaviour as of now, for what I can see)
- Since CMake is used and configured in the project, only now register a task provider for cmake tasks
This would allow to reduce the UX clutter, because the CMake extension doesn’t turn on apparently for no reason adding a lot of unwanted UI elements, and in my opinion is more correct, because there is no reason to register a cmake task provider if there is no cmake project in the first place
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
Sorry for the inconvenience. We will be fixing this for the next release.
I tried it and I believe the issue is fixed now, thank you!