-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
VS Code should disable/deactivate extensions before uninstalling them to prevent uninstall from failing #26828
Comments
I have this issue with an extension I am developing as well. |
For those who just want to fix the "please restart code before reinstalling X" issue:
|
FWIW, we are getting similar reports from users for our extension. Sometimes the error seems to be caused by an ongoing auto-update functionality. |
I also encountered this issue today with the C++ extension. You can workaround this without a reboot by closing code, then using procexp (sysinternals process explorer) to find handles on files in the extension directory. Kill any processes associated with those handles and you're all good to remove the extension folder and start vscode back up again. I think I had a running intellisense process after VS Code had shutdown and that was what required nuking from orbit. |
Oh, recently, I've just been doing a Close Folder before uninstalling the cpptools extension (e.g. when we need to test a newer internal VSIX). |
Thanks @deltaz0, was enough just with deleting extension folder. =) |
@sean-mcmanus Please revalidate this issue with latest insiders. We no longer delete the folder while uninstalling an extension. We just mark it as uninstalled. Extension will not be loaded in the next reload and the extension folder is deleted in the next restart of VS Code. |
Steps to Reproduce:
Bug: No "Reload/Install" button appears, because the VS Code uninstaller tries to delete the running extension process while it's still running (so the process never gets removed until VS Code is restarted). The process continues to run because our extension gets no deactivate message. Doing a Reload Window causes the extension to appear uninstalled in the Extensions window, but when you click the Install button it gives the error "Please restart Code before reinstalling C/C++".
Workaround: Doing a Disable/Reload before the Uninstall prevents the error. It would be great if VS Code would do this automatically.
The text was updated successfully, but these errors were encountered: