How do I add a file as a link between different projects in Visual C# Express?
Locked
-
Wednesday, April 08, 2009 8:57 AM
How do I add a file as a link between different projects in Visual C# Express?
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
All Replies
-
Wednesday, April 08, 2009 8:57 AM
Suppose we have two projects in one solution. Both the projects need identical configuration files. Generally, we will create one App.config file then add it to another project via right click project name in Solution Explorer à“Add” à “Existing Item…”.
Here is another method to share a configuration file between projects:
1) Create the App.config file in one project.
2) Right click another project name in Solution Explorer à “Add” à “Existing Item…”
3) Find the App.config file in the first project and select it. Note: Do not directly click the “Add” button, but click the little triangle beside the “Add” button and choose “Add as a line” instead.
Afterwards, the App.config is shared between the projects. The benefit: the shared file can only be opened by one project at a time. If we try to open it in another project before the file is closed, a warning message will pop up. This can reduce the amount of effort needed to make common changes. This can also reduce the chance of errors due to missing a file or two.
Here is a video that shows how to add a link between projects:
http://www.dimecasts.net/Casts/CastDetails/10Related thread:
http://social.msdn.microsoft.com/forums/en-US/Vsexpressvcs/thread/5cdc7de1-2974-453e-8e6f-c6c8c1f8af91/For more FAQ about Visual C# Express, please see Visual C# Express FAQ
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked As Answer by Xiaoyun Li – MSFT Wednesday, April 08, 2009 8:59 AM

