An assembly as a collection of types and resources that form a logical unit of functionality. It is a fundamental unit deployment, version control, reuse, activation scoping, and security permissions for a .NET application. Assemblies are the building blocks of the .NET Framework and can take the form of an executable (.exe, also known as process assembly) file or dynamic link library (.dll, also known as library assembly) file. Assemblies are the smallest versionable unit in the CLR.

An assembly can contain one or more modules. Assemblies provide the CLR with the information it needs to be aware of type implementations.

Properties of an Assembly
  • An assembly is implemented as .exe or .dll file.
  • An assembly can be shared between applications by putting it in the Global Assembly Cache (GAC). Assemblies must be strong-named before they can be included in the Global Assembly Cache.
  • Information about an assembly can be obtained programmatically by using Reflection.
  • Assembly contains code that the CLR executes.
  • MSIL code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest.
  • Each assembly can have only one entry point (DllMain, WinMain, or Main).
  • An assembly is the unit at which permissions are requested and granted. Thus, it forms a Security Boundary.
  • It forms a Type Boundary. Every type's identity includes the name of the assembly in which it resides.
  • An assembly forms a Reference Scope Boundary. The assembly's manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types and resources that are exposed outside the assembly. The manifest also enumerates other assemblies on which it depends.
  • It forms a Version Boundary. The assembly is the smallest versionable unit in the CLR; all types and resources in the same assembly are versioned as a unit.
  • It forms a Deployment Unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes, can be retrieved on demand.
  • It is the unit at which side-by-side execution is supported.

No comments:

Post a Comment