What is an Assembly in .NET !
Assembly is the smallest unit of deployment of a .Net application. It can be a dll or an exe. When you compile an application, the MSIL(Microsoft Intermediate Language) code created is stored in an assembly. There are two types of program files : Process Assemblies (EXE) and Library Assemblies (DLL).
An assembly is automatically generated by the compiler upon successful compilation of every .NET application. It is generated only once for an application and gets updated after each further compilation.
Assembly thus forms the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions.
Components of an Assembly-
Assembly is composed of 4 different components: (not going into detail for each component)
- Assembly Manifest
- MSIL source code
Types of assemblies-
- Private Assembly : Assembly that is used by single application. It is stored in the local folder of the application.
- Public/Shared Assembly : Assembly that is allowed to be shared by multiple applications. A shared assembly should be present in Global Assembly Cache(GAC) with a strong name assigned to it.
Note# – A single assembly can contain the compiled code of only one .Net programming language. However, there is not limit to the number of classes that can be compiled to a single assembly.
Going more deep in Assemblies is not required as it is created internally by the compiler.
Please leave your comments and feedback.
Thanks for checking out !