如何“添加现有项目..."在Visual Studio中可以工作吗? [英] How is "Add Existing Item..." in Visual Studio meant to work?

查看:128
本文介绍了如何“添加现有项目..."在Visual Studio中可以工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从不使用Visual Studio解决方案资源管理器中的"添加现有项目..." 功能,因为它令人困惑:

I never use "Add existing item..." feature in Visual Studio's Solution Explorer because it is confusing:

  • 在我看来,它应该工作的方式是,如果您在Models目录中有一个Customer.cs文件,则可以选择添加现有项",然后它会向您显示该目录中存在哪些项允许您选择一个.相反,它会打开文件对话框,打开您硬盘上某个看似随机的目录,我不确定是要复制该文件,还是在外部使用该文件解决方案等
  • 相反,如果我想添加一个existimg项",我进入Windows资源管理器,单击文件,CTRL-C,在解决方案资源管理器中单击文件夹ctrl-v,这很清楚
  • it seems to me the way it should work is that if you have a Customer.cs file in Models directory, that you could choose "Add existing item", it would then show you which items exist in that directory an allow you to choose one. Instead, it opens a file dialogue to some seemingly random directory on your hard drive, and I'm not sure if it is going to make a copy of that file, or use it outside the solution, etc.
  • instead, if I want to "add an existimg item", I go into windows explorer, click file, CTRL-C, click folder in solution explorer, ctrl-v, and it is clear

其他人做的不同吗?我是否缺少有关解决方案资源管理器中添加现有项目"应该如何工作的信息?

推荐答案

该文件夹将在您最后一次离开的地方打开...

The folder opens where-ever you last left it...

关于使用此功能;通过 default ( Add ),它对IMO的帮助最小. 复制文件.但是,如果您注意到,添加按钮实际上是一个下拉列表;点击向下箭头,您可以在文件中添加链接-即,将其保留在原处并按位置进行引用(添加为链接).

As for using this feature; by default (Add) it does IMO the least useful thing; copy the file. But if you notice, the add button is actually a drop-down; hit the down arrow and you can add a link to the file - i.e. leave it where it is and reference it by location (Add As Link).

这篇关于如何“添加现有项目..."在Visual Studio中可以工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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