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.
Can't rename both files and folders in Visual Studio 2022

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:
- Can't rename files and folders
- 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.
3 answers
Sort by: Most helpful
-
-
Garry McGlennon 36 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.
-
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.