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:
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
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.
@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.
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.cmake
Feel free to close when you believe you've solved the issue preventing it from being installed automatically.
Thanks for your help!
I do have the same problem as @jayphelps but I already had Cmake (from twxs) installed
I needed to uninstall both CMake, and CMake Tools extensions. After re-installing them, everything worked again.
@kriegalex, are you still seeing this problem? Did this first start after the 0.9.5 update?
@vector-of-bool I just started getting this issue today also.
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.
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 :
[Extension Host] Error setting up client: AssertionError: Unknown cache entry type: undefined
at Console.assert (console.js:95:23)
at Function.parseCache (C:\Users\kriegalex\.vscode\extensions\vector-of-bool.cmake-tools-0.9.6\out\src\cache.js:116:29)
at Function.<anonymous> (C:\Users\kriegalex\.vscode\extensions\vector-of-bool.cmake-tools-0.9.6\out\src\cache.js:65:50)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\kriegalex\.vscode\extensions\vector-of-bool.cmake-tools-0.9.6\out\src\cache.js:4:58)
[Extension Host] Error during CMake Tools initialization! TypeError: Cannot read property 'getGlobalSettings' of undefined
at ServerClientCMakeTools.<anonymous> (C:\Users\kriegalex\.vscode\extensions\vector-of-bool.cmake-tools-0.9.6\out\src\client.js:328:44)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\kriegalex\.vscode\extensions\vector-of-bool.cmake-tools-0.9.6\out\src\client.js:4:58)
The second error can be removed by disabling CMake server (cmake.useCMakeServer=false).
@vector-of-bool I set cmake.useCmakeServer to falsejust like the fix in #163 and it worked, thanks.
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".
OK guys, problem solved!
Platform: Windows + MinGW
Solution:
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.
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!