By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

File Linking - .Net

P: n/a
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
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.