Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is "Add Existing Item..." in Visual Studio meant to work?

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

  • 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

Do others do it differently? Am I missing something about how "add existing item" in solution explorer is supposed to work?

like image 874
Edward Tanguay Avatar asked Jul 31 '09 11:07

Edward Tanguay


1 Answers

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

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).

like image 87
Marc Gravell Avatar answered Nov 16 '22 01:11

Marc Gravell