Assembly
Assemblies are the building blocks of .NET Framework applications;
they form the fundamental unit of deployment, version control,
reuse, activation scoping, and security permissions.
An assembly is a collection of types and resources
that are built to work together and form a logical
unit of functionality. An assembly provides
the common language runtime with the information
it needs to be aware of type implementations.
To the runtime, a type does not exist outside
the context of an assembly.
Assembly Benefits
Assemblies are designed to simplify application deployment
and to solve versioning problems that can occur with component-based applications.
End users and developers are familiar with versioning
and deployment issues that arise from todays component-based systems.
Some end users have experienced the frustration of installing a new
application on their computer, only to find that an existing application
has suddenly stopped working. Many developers have spent countless hours trying to keep
all necessary registry entries consistent in order to activate a COM class.
Many deployment problems have been solved by the use of assemblies in the .NET Framework.
Because they are self-describing components that have no dependencies
on registry entries, assemblies enable zero-impact application installation.
They also simplify uninstalling and replicating applications.
Versioning Problems
Currently two versioning problems occur with Win32 applications:
a.
Versioning rules cannot be expressed between pieces of an application
and enforced by the operating system. The current approach relies
on backward compatibility, which is often difficult to guarantee.
Interface definitions must be static, once published, and a single
piece of code must maintain backward compatibility with previous versions.
Furthermore, code is typically designed so that
only a single version of it can be present and executing on a computer at any given time.
b.
There is no way to maintain consistency between sets of components
that are built together and the set that is present at run time.
These two versioning problems combine to create DLL conflicts,
where installing one application can inadvertently break an existing
application because a certain software component or DLL was installed
that was not fully backward compatible with a previous version.
Once this situation occurs, there is no support in the system for
diagnosing and fixing the problem.
The Assembly Solution
To solve versioning problems, as well as the remaining problems that
lead to DLL conflicts, the runtime uses assemblies to do the following:
Enable developers to specify version rules between different software components.
Provide the infrastructure to enforce versioning rules.
Provide the infrastructure to allow multiple versions
of a component to be run simultaneously (called side-by-side execution).
Assembly Contents