How can I compile controls to a single DLL?

  • Thread starter Thread starter chambersdon
  • Start date Start date
C

chambersdon

I have several projects that I need to compile into a single DLL. Is
this possible?

We have a project called 'Utilities' that includes classes to which
encapsulate business logic.
I've now created another project called 'Controls' with custom controls
that can be used by all of our developers. The Controls project has a
reference to the Utilites project because it needs some of this
functionality.
How can I build the Controls project so everything needed is put into a
single dll?

A single dll will make it much easier to manage and simplier to keep
each developers environemnt up to date. Any new developer wuld just
need the out-of-box IDE and one DLL to access our custom controls.
Can the IDE build a single DLL like the old C++ visual studio IDE could
do? I think this was called a 'static dll'. If not, can any of the
command line line tools give me what I need?

Thanks,
Don
 
If you create a Class Library project the output is going to be a dll
that you can use in other projects providing you add references to it.
 
I undertstand that. I have a class library project called 'Controls'.
I want to compile 'Controls' into a dll named Control.dll and provide
that dll, and only that dll, to the rest of the team.

Controls has a reference to the Utilities dll so a copy of
Utilities.dll is stored in Controls bin directory. When I compile
Controls I get a Control.dll file but I still need ot distribute
Utilities.dll to the rest of the team. I want everything compiled into
one DLL.
 
If you have the source for both dlls you could place them in the same
project and compile them together. You would not necessarily need to have
the class files in the same directory as the project as you can always
"link" to the files instead. Or you could use the ILMerge utility to merge
two assemblies together
(http://research.microsoft.com/~mbarnett/ilmerge.aspx). I haven't used this
utility but it should allow you to merge your two dlls together after they
have been compiled. Is it really that big of a problem to distribute two
assemblies? It may allow for cleaner separation in the long run to keep the
utilities assembly and a custom control assembly separate. When the devs
drag and drop an instance of a custom control from the toolbox the design
environment should add a reference to the custom control assembly as well as
its dependencies.
 
It is not a huge problem to distirbute everything but i makes it much
easier when new people come to the team. Some of our 'coders' just
hammer out code and don't really understand .NET. They run into dll
problems and get stuck. Not the ideal way to work but I don't have the
power to change it.
 
Back
Top