Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

share source files between solutions

Status
Not open for further replies.

eward1

Programmer
Feb 24, 2003
18
US
How can I share a source file between two solutions? As soon as I include a source file in my project, VB copies the file to my current project directory and any changes I make are only on the local copy. If I go back to the other project, my changes do not appear. I want to have one file in a common directory that is linked to both projects.
 
Sounds like you need to put some of the source code in a dll class library, in its own project. Then you can add this project to both solutions and changes in either will reflect in the other.

Mark [openup]
 

When you select Add Existing Item and get the open file dialog box, instead of clicking Open (which copies the file into your solution) click the drop down button on the Open button and select Link File.

This will put a link to the file in your solution, but the file will physically remain in it's original location.

Clearly, any change you make to the linked file will affect both solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top