EXE vs DLL Creation

B

Ben Kim

Hello all,

In Clarion for Windows we were able to create many DLL's and a single
execute that would link in the DLL's (LIB's). You could cross DLL->DLL
(imports/exports) and interconnect many procedures/methods. So we could
create a DLL for Persons, one for Businesses, and so on.

What is the recommended way to do this in VB.NET 2005? I would rather not
compile the same Class Library or Module into many EXE's and bloat the
system. Is there anyway to accomplish the same thing or something similar
in VB.NET? I have not seen any project settings to compile anything into
just a DLL.

Any help would be greatly appreciated.

Ben Kim
Emergitech
 
C

Chris Dunaway

If you create a Class Library project, it will compile into a .dll
which can be used by many .exe's or .dll's. I'm not sure what your
concern is? If the assemblies (.dlls) you create are to be shared by
many different apps, they can be installed in the Global Assembly Cache
(GAC) so that only a single copy of the .dll exists on the system.
 
C

Cor Ligthert [MVP]

Ben,

A very classic way, not the way it is done anymore in Net in my opinion.

(Your method is a classic way of using memory in a single user 640Kb
environment)

However this is my opinion.

Cor
 
B

Ben Kim

Cor,

Remember I am coming from a Clarion environment which creates 32-bit DLL's
and EXE's. So if that is the classic way, what is the "DOT NET" way?

Ben Kim
Emergitech
 
M

Marina Levit [MVP]

Create a project that is a Class Library. That compiles into a DLL.

This is in fact the recommended way. All common functionality goes into a
DLL. Then multiple applications can reference the same DLL and use it,
without having their own copy of the same code.

The Global Assembly Cache (GAC) is also there, so that not only do you only
have 1 copy of the code on your development machine, but now you can have
only 1 copy of the DLL on a deployment machine, but have multiple
applications all use that one copy.

You might want to do some searching of the .net framework documentation and
the web for more details on this.
 
C

Cor Ligthert [MVP]

Ben,
Remember I am coming from a Clarion environment which creates 32-bit DLL's
and EXE's. So if that is the classic way, what is the "DOT NET" way?
Not to care about it before it is needed and folow the tools in the way as
they make your program.

You can create as much class librarys as you want by the way to make those
librarys reusable.

Cor
 

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

Top