vscode icon indicating copy to clipboard operation
vscode copied to clipboard

VSCode 1.97.2 suddenly deleted from Windows

Open kalebers opened this issue 10 months ago • 6 comments

Does this issue occur when all extensions are disabled?: Yes

Version: 1.97.2 (user setup) Commit: e54c774e0add60467559eb0d1e229c6452cf8447 Date: 2025-02-12T23:20:35.343Z Electron: 32.2.7 ElectronBuildId: 10982180 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Windows_NT x64 10.0.22631

Steps to Reproduce: At the moment no info on how to reproduce the issue, it happens randomly. Logged into my work windows laptop and VSCode wasn't installed anymore, although on Friday 14 of February it was working all day.

Note: I also experienced this same issue on MacOS with previous version, where between laptop restarts VSCode just stops working or is removed from the applications, as it's a "corrupted" application.

kalebers avatar Feb 17 '25 10:02 kalebers

Same here. Allmost all files in C:\Users\%username%\AppData\Local\Programs\Microsoft VS Code disappeared. Strucutre of empty subfolders is still there. The follwing uninstall related files are in the folder now (with timesrtamp from 14/02/2025, subfolders like bin are empty):

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        15.02.2025     23:04                bin
d-----        15.02.2025     23:04                locales
d-----        15.02.2025     23:04                policies
d-----        12.02.2025     08:41                resources
d-----        14.02.2025     17:45                tools
d-----        14.02.2025     17:45                _
-a----        14.02.2025     17:45       12932246 unins000.dat
-a----        14.02.2025     17:45        2629176 unins000.exe
-a----        14.02.2025     17:45          28125 unins000.msg

The .vscode folder in the user directory luckily still is populated.

Sysinfo excerpt:

Betriebssystemname:                            Microsoft Windows 11 Pro
Betriebssystemversion:                         10.0.26100 Nicht zutreffend Build 26100
Systemtyp:                                     x64-based PC
Prozessor(en):                                 1 Prozessor(en) installiert.
                                               [01]: Intel64 Family 6 Model 186 Stepping 2 GenuineIntel ~2400 MHz
BIOS-Version:                                  American Megatrends International, LLC. E17L5IMS.113, 26.10.2023
Hotfix(es):                                    3 Hotfix(e) installiert.
                                               [01]: KB5049622
                                               [02]: KB5051987
                                               [03]: KB5052085

mame82 avatar Feb 17 '25 18:02 mame82

Having the same issue on my mac since December. VS Code suddenly closes with no error or info. Icon is removed from doc, code command returns 'not found', and the .app in /Applications is 0 bytes. Happening on OSX 15 and 14

VS Code version: Code 1.97.2 (Universal) (e54c774e0add60467559eb0d1e229c6452cf8447, 2025-02-12T23:20:35.343Z) OS version: Darwin arm64 24.3.0 Modes:

System Info
Item Value
CPUs Apple M3 Pro (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 3, 2
Memory (System) 36.00GB (2.23GB free)
Process Argv .
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
vscode-apollo apo 2.5.4
vscode-tailwindcss bra 0.14.5
vscode-eslint dba 3.0.10
gitlens eam 16.3.0
prettier-vscode esb 11.0.0
copilot Git 1.272.0
copilot-chat Git 0.24.1
vscode-yaml red 1.16.0
fortnite-vscode-theme sdr 1.3.0
vue-vscode-snippets sdr 3.2.0
code-spell-checker str 4.0.34
volar Vue 2.2.2
pretty-ts-errors Yoa 0.6.1

BoxenOfDonuts avatar Feb 17 '25 22:02 BoxenOfDonuts

Seeing this issue with users at my Org. Thought it may have pertained to updates as it seemed to happen every time a new VSCode patch came out so we started telling users to disable auto updates in VSCode. A user we had apply this setting did this after the 1.97.1 -> 1.97.2 path last Thurs/Fri and then found it deleted a second time today.

C9-Proxyjack avatar Feb 18 '25 17:02 C9-Proxyjack

This keeps happening to me repeatedly on Windows. Must be about the 5th time VS Code has uninstalled itself now. Apparently it's happening with many other users in my company as well.

hpesoj avatar Mar 06 '25 13:03 hpesoj

Sorry for the delay here, can you attach the file that starts with vscode-inno-updater- from your user temp directory that should be generated when the update happens.

deepak1556 avatar Mar 06 '25 23:03 deepak1556

Logs attached. Grabbed the mix of them as I'm unsure which one relates to the many uninstalls this user has. I did obscure the username for my own org purposes.

vscode-inno-updater-logs.zip

C9-Proxyjack avatar Mar 07 '25 19:03 C9-Proxyjack

Happened to me as well on Windows. Almost all resources disappeared in the "Microsoft VS Code" folder, except for the uninstall executable and a couple of folders (see attached screenshot).

There's a folder named "_" (underscore) that seems to contain all previous files (including the "Code.exe" file), so I assume it was a bad update. This is the second time VS Code has uninstalled itself on Windows.

The last entries from the "vscode-inno-updater" file are:

Mar 06 19:10:40.335 INFO All file handles marked for deletion
Mar 06 19:10:40.446 INFO All files deleted
Mar 06 19:10:40.446 INFO Delete directory recursively: "G:\\Programs\\Microsoft VS Code\\bin" (attempt 1)
Mar 06 19:10:40.446 INFO Delete directory recursively: "G:\\Programs\\Microsoft VS Code\\locales" (attempt 1)
Mar 06 19:10:40.447 INFO Delete directory recursively: "G:\\Programs\\Microsoft VS Code\\policies" (attempt 1)
Mar 06 19:10:40.451 INFO Delete directory recursively: "G:\\Programs\\Microsoft VS Code\\resources" (attempt 1)

Update: after moving all files out of the "_" directory, functionality seems to be restored. So I assume the root cause is not using symlinks when performing updates and instead physically replacing folders/files. If a shutdown happens during this process, then the installation becomes corrupt.

colin-dumitru avatar Mar 08 '25 07:03 colin-dumitru

I had this problem too.

Also found quite a few people who had it too. See for instance: https://answers.microsoft.com/en-us/windows/forum/all/vs-code-uninstalled-after-24h2-update/c7b83528-7a4f-4622-a45f-0c2f6e5644d6

Not sure what is better:

  • copy content in \_\ to folder above
  • change your shortcut to .exe in \_\

I did the first and hoped for the best and it worked....

SanderPs avatar Mar 10 '25 13:03 SanderPs

Same

Michota avatar Mar 11 '25 08:03 Michota

I have the same issue. VS Code vanished 10 days ago from my Windows and today again. In both cases, I was able to reinstall it.

johaag avatar Mar 17 '25 09:03 johaag

This just happened to me too. all files where moved to _ folder. i had left it running overnight and continued using it this morning until i needed to reboot and then ^poof^ its gone. Surely the updater can check if it's running first before trying to move it!

b2b-fesports avatar Apr 01 '25 06:04 b2b-fesports

Same here. C:\Users%username%\AppData\Local\Programs\Microsoft VS Code folder is completely gone.

mvenditto avatar May 30 '25 20:05 mvenditto

Can confirm just happened to me spontaneously after a restart, initially a was afraid of potential malware..

GeorgeDeac avatar Jul 11 '25 10:07 GeorgeDeac

Similar happened to me also after I restarted the PC.

ShauryaDusht avatar Jul 22 '25 13:07 ShauryaDusht

Just happened to me as well, randomly after a restart. The fix of moving everything from C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code\_ (Path see here) to the parent directory worked though.

ehonda avatar Jul 24 '25 21:07 ehonda

This just happened to me too. Got the _ folder too, moving it back to the parent folder seems to fix it.

SorteKanin avatar Jul 25 '25 08:07 SorteKanin

Completely vanished after a single reboot.. insane

gambin avatar Jul 25 '25 17:07 gambin

same happend to me on windows

AramK0 avatar Aug 22 '25 10:08 AramK0

I was completely mental trying to figure out what was wrong. Horrible -- not worth the headache anymore. Thanks to the people who documented this issue so thoroughly

medium-old avatar Aug 22 '25 21:08 medium-old

It happened to me too. I was frightened too.

sclee-aether avatar Sep 15 '25 00:09 sclee-aether

Same here!

kubiksk8ter avatar Sep 19 '25 06:09 kubiksk8ter

Happend to me too

Image I started by pc recently, I just wanted to open it using the shortcut in the taskbar, then I saw this. Seems like the folder was deleted like explained from the other users above.

I re-downloaded the newest file, executed the installer, it recovered. Strange, why does this happen?

martinbndr avatar Sep 26 '25 12:09 martinbndr

Happened to me after updating to Windows 11 Version 24HS, but I was able to find it in C:\Users\{Username}\AppData\Local\Programs\Microsoft VS Code\_

dylanvu avatar Sep 28 '25 05:09 dylanvu

Happened to me today after opening up my system. VSCode present in my laptop earlier in the day however I opened it and all my shortcuts pointed to nothing, and system couldn't find file executable.

Upon re-installing, my VS Code folder space and files open were just as how I had it before the uninstall.

Hassoonu avatar Oct 04 '25 01:10 Hassoonu

It happened to me, too. I thought it was just mine.

trongnsiwa avatar Oct 05 '25 07:10 trongnsiwa

Happened again. I believe I didn't properly shut down my system (sleep, lock, or shutdown) so that might be a factor, however still no clue. The shortcuts were there, but the target executable was removed.

Hassoonu avatar Oct 10 '25 04:10 Hassoonu

Happened to me too after the most recent W11 software update. I used VS code, but i closed it before rebooting the system. Reinstalling VS code solved the issue as preferences and plugins were not removed, but that was a bit annoying.

Pavinati avatar Oct 10 '25 08:10 Pavinati

I think this also might be a Windows issue because it happens to me with another software aswell (Terminus ssh client) but maybe it can somehow be fixed to avoid occuring on vscode idk.

martinbndr avatar Oct 12 '25 11:10 martinbndr