File Linking - .Net

M

Mythran

Just wanted to let y'all know something that I dug up...maybe ya already knew.

You know you can link files in .Net so you can work on 1 single file and have it
compile for each project or selected projects in 1 solution?

Two examples:

I have a common module I want in my DAL and BLL project which contain simple
logic functions/subs and don't really "fit" into a class (just let's say it's
true). But instead of having a common.vb module in both the DAL and BLL project,
I want to LINK the file to both and only have 1 working file to modify.

Another use that is more popular is Solution-Wide assembly attributes. I want my
DAL and BLL to have the same key and version number, and/or some other assembly
attributes. Instead of placing these attributes into the AssemblyInfo.vb file, I
want to create another code-file and include it into all projects.

Well...answer..

Create the file, add it to the solution (you can add to the solution itself as an
existing item, creating a new item under the solution, or just add a new item to
one of the projects. Any will work). Once a file that you want has been added
to the solution or one of the projects, you can "link" it to any other project in
the solution. Just right-click on the project or folder you want it to be
"added" to and select the Add Existing Item action. Then, locate the file in
question...before you click the "Open" button, notice that it has a drop-down
arrow (the button that says "Open" has the arrow). Drop down to see the "Link"
button and click it. Now just click the "Link" button to link the file to the
project.

Please note, I will be testing this feature with SourceSafe to see how it
works...may or may not remember to reply back here to let ya know what will
happen....

By the way, if you already knew about this...sorry...this is for those that
didn't :) I didn't and I've been developing in .Net for awhile now heh.

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,199
Latest member
AnyaFlynn6

Latest Threads

Top