Assemblies in .Net

When you compile an application, the MSIL code created is stored in an assembly . Assemblies include both executable application files that you can run directly from Windows without the need for any other programs (these have a .exe file extension), and libraries (which have a .dll extension) for use by other applications.
 
In addition to containing MSIL, assemblies also include meta information (that is, information about the information contained in the assembly, also known as metadata ) and optional resources (additional data used by the MSIL, such as sound files and pictures). The meta information enables assemblies to be fully self – descriptive. You need no other information to use an assembly, meaning you avoid situations such as failing to add required data to the system registry and so on, which was often a problem when developing with other platforms.
 
This means that deploying applications is often as simple as copying the files into a directory on a remote computer. Because no additional information is required on the target systems, you can just run an executable file from this directory and (assuming the .NET CLR is installed) you ’ re good to go.
 
Of course, you won ’ t necessarily want to include everything required to run an application in one place. You might write some code that performs tasks required by multiple applications. In situations like that, it is often useful to place the reusable code in a place accessible to all applications. In the .NET Framework, this is the Global Assembly Cache (GAC) . Placing code in the GAC is simple — you just place the assembly containing the code in the directory containing this cache.