当我尝试将任何 文件添加到我的项目时,出现此错误:
A file or folder with the name azazaz.cs already exists.
Please give a unique name to the item you are adding, or delete the existing item first.'
Visual Studio 最近没有更新。问题只出现在这一个项目中。它在其他计算机上正常工作。
到目前为止我尝试了什么:
我尝试了许多不同的名称,检查了隐藏文件,并检查了文件夹位置。
按照 AbhishekP 的建议删除存储库并重新下载(通过 GitHub)。
按照 Srikanth 的建议删除了“AppData\Local”文件夹中的“ComponentModelCache”文件夹。
检查错误消息中文件名的“.csproj”文件夹,但它不存在。
我真的无法重新开始并创建一个新项目。
最佳答案
删除下面提到的路径下的“ComponentModelCache”文件夹,然后重新启动 Visual Studio。对于我安装的 Visual Studio 2012,以下是路径。根据您的 Visual Studio 版本搜索。
“C:\Users\ic016028\AppData\Local\Microsoft\VisualStudio\11.0\”
关于c# - 无法将文件添加到解决方案 : "A file or folder with the name [name] already exists",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24566467/