DEV Community

Cover image for An error occured while trying to create a file in the destination directory: Access is denied
Just Determined
Just Determined

Posted on

An error occured while trying to create a file in the destination directory: Access is denied

I am using VS Code in my windows 10 desktop to develop Web projects. For some days, an error dialogue box popped up suddenly with the following notice:

An error occured while trying to create a file in the destination directory: Access is denied

The popup persisted for almost a month and it annoyed me.
I tried to resolve that by updating and reinstalling VS Code, and by deleting the 000unins.exe file in the destination folder. But the error wasn't resolved.

Here is what worked for me:

  1. When I run VS Code as administrator the error didn't occured. So I set VS Code to run as Administrator. See how to do that
  2. I uninstalled VS Code and downloaded VS Code ZIP file instead of the installer and unzipped it in my AppData\Local\Programs folder. It's been working fine and the error hasn't occured.

Top comments (0)