Home / DeveloperSection / Articles / Assemblies in C#

Assemblies in C#

Allen Scott 5930 06-May-2016

Assemblies are the building blocks of the .net framework. An assembly is a collection of types and resources that are building to work together and form logical units of functionality. An Assembly problem the common language run time the information it needs to be aware of type implementation, To the run time a types does not exist outside the content of an assembly.

Every project after compilation will generate an output the known as assembly .The assembly name as same as project name. The assembly corresponding to a project will present under bin/debug folder of the project. Assembly is known as units of deployment because once the project development is completed what we carry and install on the client system is assembly files only. The extensions of the assembly .dll (dynamic link library) and .exe (executable).

Assemblies are two types:

     1. Private Assembly

     2. Shared Assembly 

Private Assembly: By default every assembly are private. If reference of these assemblies added to any project, a copy of the assembly is created and given to the project to each project maintain private copy of the assembly. 

Shared Assembly: If we intend to use an assembly among several application private assembly are not feasible. In such we can install it into a centralized location known as a global assembly (gac). Each computer common language runs time machine-wide code. The global assembles Cache stores assemblies specially designed to be shared by several application on the computer. 

Strong Name:  Assembly deployed in the global assembly cache must have a strong name. When assembly is added to the global assembly cache, integrity checks are performed on all files. Strong name consists to the assembly’s identity- Simple text name, Version and public key.

Name: It was the name of an assembly used for identification. Every assembly by default has name.

Version: Software’s maintain versions for discrimination changes from time to time.

Public Key:  Gac contains multiple assembles in it, to identify to each assembly it will maintain a key value for the assembly known as public key, which should be generated by us an associated was the assembly to make it strong.

Updated 26-Jan-2019

Leave Comment

Please enter subject.
Please enter comments message.


Liked By