17.7 Private Assemblies
Assemblies come in two flavors:
private and
shared
. Private assemblies are intended to be
used by only one application; shared assemblies are intended to be
shared among many applications.
All the assemblies you've built so far are private.
By default, when you compile a C# application, a private assembly is
created. The files for a private assembly are all kept in the same
folder (or in a tree of subfolders). This tree of folders is isolated
from the rest of the system, as nothing other than the one
application depends on it, and you can redeploy this application to
another machine just by copying the folder and its subfolders.
A private assembly can have any name you choose. It does not matter
if that name clashes with assemblies in another application; the
names are local only to a single application.
In the past, DLLs were installed on a machine and an entry was made
in the Windows Registry. It was difficult to avoid corrupting the
Registry, and reinstalling the program on another machine was
nontrivial. With assemblies, all of that goes away. With private
assemblies, installing is as simple as copying the files to the
appropriate directory. Period.
|