具有名称的文件或文件夹已经存在Visual Studio [英] A file or folder with the name already exists Visual Studio

查看:327
本文介绍了具有名称的文件或文件夹已经存在Visual Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将新文件添加到源代码控制的VS2012解决方案中,并收到以下消息:

I try to add a new file to my source controlled VS2012 solution and receive this message:

名称为"xxx"的文件或文件夹已存在.请给一个独特的 为要添加的项目命名,或先删除现有项目.

A file or folder with the name 'xxx' already exists. Please give a unique name to the item you are adding, or delete the existing item first.

我100%确定没有给定名称的文件.

I'm 100% sure that there is no file with the given name.

那我如何让VS重新添加项目?

So how do I get VS to add items again?

推荐答案

重新启动Visual Studio没有帮助,该文件夹已缓存在系统上.

Restarting Visual Studio didn't help, the folder is cached on the system.

打开Solution Explorer,有一个看起来像很多页面的图标:,它是Show All Files.单击后,就可以在Visual Studio项目中看到导致此错误的文件夹. (在查看"部分中找到该文件夹​​.)

Open Solution Explorer there is an icon that looks like a many Pages: which is the Show All Files. Once clicked, one is able to see the hidden, to the visual studio project, the folder that was causing this error. (Look for the folder in the View section.)

删除不需要的文件夹并重建项目后,您应该能够创建将自动创建视图的控制器...

After I deleted the unwanted folder, and Rebuild Project, You should be able to Create the controller which will create the view automatically...

这篇关于具有名称的文件或文件夹已经存在Visual Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆