Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
Adding or linking existing files to a project in Visual Studio .NET
Article ID: 306234 - View products that this article applies to.
This article was previously published under Q306234
When you add a file to a project, you can either save the file to the project's folder, or you can link the file to the project. This article describes these options.
When you add an existing file to a project, the default option is to copy the file to the folder where your current project resides. If you want to instead link to the file (rather than actually moving the file to that folder) you can do so.
There is an important difference between these two options. If the file in question is shared between several projects and you want any changes that you make from any project to be reflected in the file, then you should link the file. If not, then you should copy the file so that each project has its own distinct copy. These options can be used in combination, but you should be careful to keep track of which project files are linked and which have been copied.
How to Specify the File Add OptionWhen you add an existing item to a project, you will be presented with the standard Open file dialog box. Look carefully at the Open button on this dialog box. You will see a drop-down arrow on the right edge of the button. Clicking on the arrow will display a list of three options:
Open with allows you to specify an alternative program to open the file with.
Link file leaves the file in its current location and maintains a link to the file from your current project.