在Visual Studio中添加文件 [英] Add file in Visual studio

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

问题描述

大家好,

尝试向项目中添加新类时,Visual Studio中出现错误:

无法添加项目.在源代码管理下已经存在一个具有相同名称的项目,该项目阻止此添加操作继续进行.请重命名该项目,然后尝试再次添加.

我在任何地方都看不到该文件,所以不知道为什么它不能让我添加它.
有人知道这里发生了什么吗?

谢谢george

Hi all,

I am getting an error in visual studio when i try to add a new class to the project:

Cannot add the item. There already exists an item with the same name under source control that prevents this add operation from continuing. Please rename the item and try adding it again.

I cannot see this file anywhere so don''t know why it will not let me add it.
Doses anyone know what''s going on here?

Thanks george

推荐答案

建议您使用源代码控制对吗?

可能是您可能没有在本地项目中使用它,但是其他人在源控制服务器上将文件的孤立副本留在了您正在使用的项目文件夹中.

您正在使用什么进行源代码控制?您应该能够浏览服务器并查看是否有匹配的文件.
Is it right in suggesting that you''re using source control?

Chances are that you may not have it in your project locally, but someone else has left an orphaned copy of the file on the source control server in the project folder you''re working in.

What are you using for source control? You should be able to browse the server and see if there is a matching file.


我正在使用整个解决方案的源代码控制.

有两个独立的团队在一个分支项目上工作.另一个分支中有此文件,尽管其他两个文件的分配都相同,因此有点奇怪.

我不知道我会怎么做,但是会尝试一下.我已经在机器上搜索了文件,因此可能在服务器上的某个位置,我将尝试搜索该文件.

感谢您的建议乔治
I am using source control for the whole solution.

There are two separate teams working on a branched project. The other branch has this file in it although allot of the other files are the same in both so its a bit odd.

I don''t know how i would do that but will give it a go. I have already searched my machine for the file so could be somewhere on the server, i will try and search for it.

Thanks for the advice George


这篇关于在Visual Studio中添加文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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