Today, I suddenly couldn't use the usual C/C++ IntelliSense features in vscode, and I notice I got this error when starting:
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at c:\Users\MyName\.vscode\extensions\ms-vscode.cpptools-0.23.0\bin\Microsoft.VSCode.CPP.Extension.exe
When I go to that folder, as it says the binary isn't there. I've tried to uninstall and reinstall the vscode-cpptools, but the error persist and the file is still missing.
I cannot give any more info on how to reproduce this: IntelliSense worked yesterday, but today, after a computer restart, it just doesn't any more.
Was able to fix this by installing the previous version, 0.22.1, and reload visual studio code. Now the binary has been added to \ms-vscode.cpptools-0.23.0\bin\ and IntelliSense is working again.
I don't know why the binary would fail to be there. Uninstall/reinstall of extensions with VS Code requires restarting VS Code after the uninstall or running the "Developer: Reinstall extension" command. I've filed a feature request on VS Code to make that command more discoverable: https://github.com/microsoft/vscode/issues/73485 .
Hello everyone,
I have a similar issue, I have a tinkerbaord S which I have installed VSC. from Headmelt. I have extensions C/C++ and platformIO installed. I use platformIO to do my coding in, which when I build it uses c/c++ to do some of the work.
I'm not sure how to fix this, it never worked for me. Is this extension not able to work do to me being on an arm processor. ?
@Dellyjoe Yes, our binary isn't built for arm yet (we have another issue tracking that...it's around our 9th most requested feature).
Same issue here on windows. Since 0.23.0. Reinstall does also not work.
Is there another way to fetch the executables as work around?
E.g. from where is the extension fetching them?
@crashdown0815 check your %userprofile%/.vscode folder and delete the ms-vscode.cpptools-<ver> folder. Sometimes there is a .obsolete file there listing our extension that prevents reinstall. Removing the entry that points to our folder can also fix it.
If the extension is unable to fetch the executables, you can try installing our "offline" version instead. Those can be found here: https://github.com/microsoft/vscode-cpptools/releases
@bobbrow thanks for the fast feedback.
Got it working. However I cannot tell which was approach was working. I tried the solution mentioned in microsoft/vscode#73485 as well before commenting here because it was not working first time either.
I'll keep it in mind next time it happens and good to know where to find the offline package. Didn't know those contain everything as I have seen some extensions fetch them during first run in VSCode.
VS Code's standard extension update route installs our "online" package which will download our dependencies after the extension loads.
The "offline" versions come pre-packaged but we can't put them in the Marketplace that way since we don't get to specify which OS our package applies to. These versions assume you are installing on a machine not connected to the Internet. In the event that you are connected, VS Code will try to install the "online" version the next time we publish an update.
This is still breaking for me every time I update VSCoode
I just got hit by this on Windows 10 VS Code v1.41.0 when updating the C/C++ extension to v0.26.2 (online version). The "fix", as mentioned above, was to delete the directory %userprofile%\.vscode\extensions\ms-vscode.cpptools-0.26.2\ and reinstall the extension from scratch. Ugh. I have "C_Cpp.updateChannel": "Insiders" set in my settings.json.
@lharcke I don't think the Insiders channel should have an impact since we don't currently have an insider vsix available.
If anyone discovers an easy way to repro this, that would help us fix it (it doesn't happen under normal conditions).
Not sure how the VS Code updater works. My guess is it could be related to corporate firewalls which inspect and let through *.zip archives of a new install (or reinstall from scratch), but which block individual component downloads with an executable *.exe ending. If the VS Code updater downloads components of an updating package one at a time, then this could be a contributing factor. I've run into this with the MSYS2 package database updater system, which is based on Arch Linux's pacman.
@lharcke We download zip files from https://download.visualstudio.microsoft.com/ locations with the per-platform Microsoft-signed binaries inside. We look for an install.lock file to determine if a redownload should occur...maybe we could do a better check to handle these unexpected cases.
@sean-mcmanus, @bobbrow
The last insider build 0.26.3-insiders2 just "installed" was missing "Microsoft.VSCode.CPP.Extension.exe". And this was on my private computer without corporate firewall.
Switched from the insider channel to the default channel and back to insider. Now it installed everything (I forgot about the re-install command). Strange.
Unfortunately I cannot reproduce the missing file error.
Why don't you guys implement an integrity check in case of an error (not only during install)? E.g. you know which files to expect in the folders. If something is missing you can retry downloading it or at least print a message where to download the missing files manually?
Btw. the link https://download.visualstudio.microsoft.com/ shows internal server error at the moment, I do not know if this may be related.
https://github.com/microsoft/vscode-cpptools/issues/3610#issue-441612668
Same issue seen even with 0.26.3, after rolling back to 0.26.2 it is working.
Just wanted to let you know that I got the same issue with an update of cpptools on my linux machine. The update happened via VS Code itself and all of the sudden the error popped up. Had to do what @bobbrow mentioned here and all seems to be OK now.
Same issue here as well.
Windows
VSCode v1.45.1
Today the cpptools extension updated from 0.28.2 to 0.28.3 and could not locate cpptools.exe . The fix by @bobbrow worked fine. As he mentioned, in %userprofile%/.vscode I did have two versions there: ms-vscode.cpptools-0.28.2 and ms-vscode.cpptools-0.28.3. Deleted both and reinstalled cpptools and everything works.
Most helpful comment
@crashdown0815 check your
%userprofile%/.vscodefolder and delete thems-vscode.cpptools-<ver>folder. Sometimes there is a.obsoletefile there listing our extension that prevents reinstall. Removing the entry that points to our folder can also fix it.If the extension is unable to fetch the executables, you can try installing our "offline" version instead. Those can be found here: https://github.com/microsoft/vscode-cpptools/releases