What is an Assembly in .NET?

 Posted by Abhisek on 1/21/2010 | Category: .NET Framework Interview questions | Views: 2994

When you compile an application, the MSIL code created is stored in an assembly.Assemblies include both executable application files(.exe files)& libraries(.dll extension)for use by other application.

In addition to containing MSIL,assemblies also include met information(i.e. information about the information contained in assembly,also called as meta-data)and optional resources(sound and picture file, etc).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 odd required data to the system registry and so on,which was often a problem when developing with other platforms.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: chpurnima-3216 on: 2/4/2010
Assembly: A self-describing collection of code and resources.

1. It is a unit of deployment like DLL or EXE
2. An assembly consists of one or more files (dlls, exe’s, html files etc.), and represents a group of resources, type definitions, and implementations of those types. An assembly may also contain references to other assemblies. These resources, types and references are called as Metadata and are described in a block of data called a Manifest .

Advantages :
1. Enables code reuse.
2. Version control
3. Security
4. Deployment

An assembly consists of: Manifest, Type Metadata, MSIL, and resource file

Login to post response