Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you include/reference a file in a project without copying it to the project directory?

I am writing an application in Visual Studio 2008. I have a help file that I want to be included in the output of my project. I want the most recent version of my help file to stay in a folder that is not my visual studio project directory. For example C:/Helpfiles.

I want to include this file in my Visual studio project so that when I build the project I get the most recent version of the file (which is in C:/helpfiles) in my project output. If I just "add existing" and select the help file will it grab the latest version from C:/helpfiles every time I build?

like image 532
PICyourBrain Avatar asked Feb 16 '10 18:02

PICyourBrain


People also ask

How do I add a reference to a shared project?

You add references to a shared project just as you would a normal project reference. In Visual Studio or Fire, you right-click the "References" node of the real project and choose "Add Reference", and then pick the shared project from the list.

How do you add references in C sharp?

In the Project Designer, click the References tab. Click the Add button to open the Add Reference dialog box. In the Add Reference dialog box, select the tab indicating the type of component you want to reference. Select the components you want to reference, and then click OK.


1 Answers

When you go to the "Add" dialog, select the file, then instead of clicking add, click the drop down arrow and select "Add as link":

Open Add sub menu

This will keep the file in the original location and not copy and import it into the current project.

like image 97
casperOne Avatar answered Sep 26 '22 17:09

casperOne