Description
With a fresh install of vscode + cmaketools, if I try to run any of the commands I just get an error that the command is not found. e.g. command 'cmake.build' not found
. None of the options show up in the toolbar, as well. Tried in 6 different cmake based projects I have on my box, same results.
Someone else posted the same issue on SO: https://stackoverflow.com/questions/44122346/vs-code-cmake-cmake-build-not-found but since it hasn't (yet) received a response I figured I'd cross post it here for more eyes. If you know the answer, you could add it to the SO question and then we can copy/link the answer here. 🎈
It's possible probable that we're just missing something obvious. If that's the case, happy to update the README so others don't make it too.
(from README)
PLEASE, if you experience any problems, have any questions, or have an idea for a new feature, create an issue
EDIT:
Solution
there's a bug preventing a dependency from being installed. You need to install this additional extension https://marketplace.visualstudio.com/items?itemName=twxs.cmake
Activity
wtianyi commentedon Jun 3, 2017
Did you install the extension
twxs.cmake
? It's a required dependency but was not installed when I installed cmaketools. Installing that solves my similar problem.vector-of-bool commentedon Jun 4, 2017
@jayphelps, as @wtianyi said, does installing the twxs.cmake extension help?
I have it listed in
package.json
as an extension dependency, and I thought that VSCode would use that to automatically install other extensions, but apparently not.jayphelps commentedon Jun 5, 2017
Yes, installing
twxs.cmake
(also known as just "CMake" in the marketplace) solved it for me. Here's a direct link to the correct one for anyone looking: https://marketplace.visualstudio.com/items?itemName=twxs.cmakeFeel free to close when you believe you've solved the issue preventing it from being installed automatically.
Thanks for your help!
kriegalex commentedon Jun 5, 2017
I do have the same problem as @jayphelps but I already had Cmake (from twxs) installed
papahabla commentedon Jun 5, 2017
I needed to uninstall both CMake, and CMake Tools extensions. After re-installing them, everything worked again.
vector-of-bool commentedon Jun 6, 2017
@kriegalex, are you still seeing this problem? Did this first start after the 0.9.5 update?
benkonz commentedon Jun 6, 2017
@vector-of-bool I just started getting this issue today also.
vector-of-bool commentedon Jun 6, 2017
The same error appears in issue #163, but it may be a different issue. Check over there if the listed solution above doesn't work for you.
kriegalex commentedon Jun 6, 2017
I just tried to uninstall, restart and reinstall, still having this problem. I don't know when it started because I have this problem since day one, but I only tried VS Code + CMake recently. I am working with Visual Studio 2015 and CMake 3.8 aside, that's why I didn't really go further.
This is the output of the Developer Tools :
The second error can be removed by disabling CMake server (cmake.useCMakeServer=false).
benkonz commentedon Jun 6, 2017
@vector-of-bool I set
cmake.useCmakeServer
tofalse
just like the fix in #163 and it worked, thanks.jessehao commentedon Jun 7, 2017
I had the same problem. few days ago, I installed this extension on my PC and everything worked well. but yesterday, I installed it to my Laptop(Windows), the problem occured. and I tried everything like uninstall them and reinstall them one by one. but it's not working.
Everything sets just like my PC's except the result.
if i turn cmake.useCMakeServer to false. it'll working, but it build project to "vscproject" instead of "MinGW Makefiles".
jessehao commentedon Jun 7, 2017
OK guys, problem solved!
Platform: Windows + MinGW
Solution:
ytimenkov commentedon Jun 7, 2017
I just checked: since vector-of-bool.cmake-tools depends on twxs.cmake extension, VS code automatically install the latter and doesn't allow to disable or uninstall it separately.
At least version 1.12 I'm using.
vector-of-bool commentedon Jun 8, 2017
So, I've just pushed 0.9.7:
As such, I'm going to close this issue and ask that anyone with any further issues open a new ticket using the new error messages that appear during a failed initialization.
Thanks for the help, everyone!