Those who prefer reading this site through RSS now can also subscribe for updates to .NET Tips & Tricks Community.
If in VS.NET you add to the current project an existing file that's located outside the current project's directory, the file is first copied in the project's directory, and then it's added to the project. However, you may want to share the same source file among multiple projects. As a trivially simple example, perhaps you get tired of specifying the same AssemblyCompany and AssemblyCopyright strings, over and over again, in all your projects? Wouldn't it be nice to have a little two-line C# file tucked away somewhere, and include it by reference in all your projects?
[assembly: System.Reflection.AssemblyCompany(".NET Tip of The Day.org")]
[assembly: System.Reflection.AssemblyCopyright("© 2007 All rights reserved.")]
To add a shared file, open the dialog to select an existing file with the Project | Add Existing Item… menu item and select the file you want to include. Then, instead of clicking the Open button, click the arrow on the left of that button, and click Link File from the list that drops down. This way you link to the original file, not to a local copy of it.