There was an error while Opening file handle

Viewed 3732

Okay so I am trying to update my VS Code but every time I click on restart to update I get the error message saying that :

"There was an error while Opening file handle: C:\Users\neela\AppData\Local\Programs\Microsoft VS Code\logs\custom-scanner-service.log": failed to create file handle: The process cannot access the file because it is being used by another process.

Please read the log file for more information : C:\Users\neela\AppData\Local\Temp\vscode-inno-updater-1624166774.log

After I opened the log file mentioned above here's what it says : Jun 20 11:00:03.966 ERRO Failed to create file handle: The process cannot access the file because it is being used by another process.

Can someone please guide me on this situation.

4 Answers

I had faced the same problem for two days. Then I ran the vs code as administrator and check for update manually from the top help menu. It got updated successfully then.

I tried taking ownership of the %appdata% vs code files, but ultimately I still ended up needing to run the update as admin.

start>right click vs code>file location>right click & open properties>compatibility tab>run as administrator. restart vscode. This worked for me

run your VScode as administrator, then go to setting at the bottom left. Click Check for Updates. It will work.

Related