Cannot add file to solution: "A file or folder with the name [name] already exists"

When I try to add a file to my project, I get this error:

A file or folder named azazaz.cs already exists.

Please provide a unique name for the item you are adding, or delete the existing item first.

There have been no updates recently for Visual Studio. The problem arises only in this project. It works correctly on other computers.

What I have tried so far:

  • I tried many different names, checked for hidden files, and checked the location of the folder.

  • Deleted the repository and downloaded it again (via GitHub), as suggested by AbhishekP.

  • The "ComponentModelCache" folder in the "AppData \ Local" folder has been deleted, as suggested by Srikanth.

  • Check the ".csproj" folder for the file name in the error message, but it does not exist.

I can not start and create a new project.

+4
source share
3 answers

Delete the "ComponentModelCache" folder under the path below and restart Visual Studio. For my installation of Visual Studio 2012 the following way. Search according to the version of Visual Studio.

"C: \ Users \ ic016028 \ AppData \ Local \ Microsoft \ VisualStudio \ 11.0 \"

+4
source

, . , . . . , .

+1

.csproj . azazaz.cs .

0

Source: https://habr.com/ru/post/1547103/


All Articles