Nathan wrote:
I have a bunch of functions i would like to share with other vb.net apps
i've created.
i've managed to create a class library project and put all my functions in
there and then built the project and now i have a dll file in the /bin/debug
dir.
How do i access its functions in another vb.net project???
Two ways:
(1) Reference the dll from your "other" project.
This will take a local copy of the dll that has to be distributed along
with your calling application (.exe + local .dll).
(2) Strongly Name the dll and add it to the Global Assembly Cache (GAC).
Reference the dll from where you compiled it - this time, it /won't/
take a local copy of it. Shipping your application now consists of the
..exe and the .dll, which has to be added to the GAC on the target
machine, but your installer, whichever you choose, should take care of
that for you.
IMHO, This is the better way to reuse code in /lots/ of applications -
there's only one copy of the dll on the machine and any application
/anywhere/ on the machine can find it. It /does/ take a little more
doing but, personally, I prefer it to having lots of potentially
different copies of the [same] dll each shipped with a different
application. YMMV.
HTH,
Phill W.