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

thebluetropics 1,046 Reputation points
2022-10-13T23:24:17.777+00:00

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,885 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Claudia Cecilia Rossi 15 Reputation points
    2023-02-03T15:11:57.4466667+00:00

    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.

    3 people found this answer helpful.
    0 comments No comments

  2. Garry McGlennon 31 Reputation points Microsoft Employee
    2023-02-03T18:06:14.6866667+00:00

    @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.

  3. Bernardo Lazo 0 Reputation points
    2024-07-18T23:53:47.3266667+00:00

    Had this issue, sometimes I could rename/delete folders/files and sometimes not. Turns out it was due to the app still running. Just stopped the app and immediately the options to rename/delete folders appeared again (when right clicking on the explorer window.

    0 comments No comments