Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Existing Files To Different Visual Studio 2010 Project

It is possible to add files to a visual studio project that is located in a different directory however keep the files in those directories and update those file when you update the file in the project? When I add existing files to a project, all it does is copy them to the project and then update the copied files, not the original files. Is there any way to get it to work the other way?

like image 530
ryanzec Avatar asked Feb 02 '11 22:02

ryanzec


People also ask

How do I add an existing project to another solution in Visual Studio?

In Solution Explorer, select the solution. On the File menu, point to Add, and click Existing Project. In the Add Existing Project dialog box, locate the project you want to add, select the project file, and then click Open. The project is added to the selected solution.

How do I add an existing folder to Visual Studio 2010?

Adding FilesRight click the project or contained folder and choose Add | Existing Item... . Use Show All Files . Click on files or folders you would like to add to the project and choose Include In Project . Drag and drop files and folders from Windows Explorer.


2 Answers

You should add them as a link/shortcut

Right-click the project, select Add > Existing Item, and in the dialog, "Add" drop down, select "Add As Link".

like image 117
Divi Avatar answered Oct 12 '22 02:10

Divi


  1. Open Visual Studio
  2. Right lick the solution Explorer and select Add | Existing item...
  3. Select the file and question, but in the "Add" drop down select Add as Link.

Alternatively I would suggest creating a class library project that you share in both solutions, this might benefit you in the future.

like image 30
BrokenGlass Avatar answered Oct 12 '22 02:10

BrokenGlass