When I open vscode, I get an error like "unable to write program user data". Can you help?

Mustafa Ensar Camgöz 35 Reputation points
2023-01-28T09:29:14.5633333+00:00

When I open vscode, I get an error like " unable to write program user data... A system error occurred (EPERM: operation not permitted,mkdir 'c:\Users\UserName.vscode') Please make sure the following directories are writeable:

C:\Users\UserName\AppData\Roaming\Code

C:\Users\UserName.vscode\extensions "

Please help me...

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
228 questions
{count} votes

Accepted answer
  1. Dimple Rane 911 Reputation points MVP
    2023-01-28T11:49:18.59+00:00

    This error is usually caused by a permissions issue. It looks like Visual Studio Code is not able to write to the directories specified in the error message.

    One solution to this issue is to run Visual Studio Code as an administrator. To do this, right-click on the Visual Studio Code icon and select "Run as administrator."

    Another solution is to ensure that your user account has the necessary permissions to write to the directories in question. To do this, navigate to the directories specified in the error message and right-click on them. Select "Properties" and then go to the "Security" tab. Make sure that your user account is listed and has the "Full control" permission.

    If the problem persists, you can also try deleting the folders and restarting VSCode.

    You can also try to reset the settings for VSCode, by running the command Code --reset-settings in command prompt.

    6 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.