Can't rename both files and folders in Visual Studio 2022

thebluetropics 1,046 Reputation points

I have read this, but it was old enough to solve the problem (the bot says, I must update to latest version).

This happen randomly, as I don't know the reason. Here is a quick explanation of what happening:

  1. Can't rename files and folders
  2. Sometimes, I can rename to different capitalization and sometimes not...

This issue sometimes can be solved by reopening visual studio, but not all the time.
What is the reason this is happening?
This behavior is annoying. Any fix/workaround to this?

Edit: Visual Studio throws me an error message box saying "...file under source code control...", but I don't use git.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,698 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Garry McGlennon 31 Reputation points Microsoft Employee

    @Claudia Cecilia Rossi this isn't the issue as I and most likely others shut VS down to resolve it. I believe VS is corrupting the data in the hidden .vs directory.

    3 people found this answer helpful.

  2. Claudia Cecilia Rossi 10 Reputation points

    Ir is probably because you "run" the project and the debugg s still active. Stop it and you will can change the name of a folder or a fie.

    2 people found this answer helpful.
    0 comments No comments