December 25, 2010

Link Files Between Different Projects - Visual Studio




You can add file to an existing project either by copying the files directly or create a link between them. When you create a link, the file does not get physically copied to a new location, only a reference is set to it. The process is quite simple as shown here.

Right click your project in Solution Explorer > Add > Existing Item. Browse to the file you want to add and click the small ‘drop-down’ arrow as shown below

image

Choose the ‘Add as Link’ option and the file will get added as a link, rather than directly adding the file to your project. Linked project items in Solution Explorer can be identified by the link indicator in its icon, as shown below.

image

Note: If the original file is deleted, the link gets broken. You also need to manually update a copy whenever changes are made to the original file.



'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

0 Responses to "Link Files Between Different Projects - Visual Studio"
 

Copyright © 2009-2013 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions