What is Assembly? How to check assemble details in .Net?   Leave a comment

Definition: An assembly is a unit of deployment.  It can be in the form of .DLL (Dynamic Linking Library) or .EXE (Executable) file.

Features: Assembly is self describing. It contains Meta data and Manifest.

Where

Meta Data: Data about data.

Manifest:  Data about Assembly.

Meta Data gives all the information about the Class (es) like properties, functions and other class variables inside the class(es). Manifest  tells about the version and other reference used in the assembly.

Let’s take an example to understand and get the clear idea about to extract or see the content inside the assembly.

Let’s create a simple class library project as per below steps.

1) Create a class library project as MyClassLibrary.

 

1

2) Create a class as MyClass and create the properties and function as per below

2

3) Compile the project and go to the path where you have created the project. Inside the debug folder which is there in bin folder you will find a DLL called as MyClassLibrary.dll (assembly).

3

4) In order to view the details of the assembly, go to the Visual Studio command prompt under the Visual Studio tool and open any one of them.

And on command prompt type the command  “ÏLDASM”. ILDASM stands for Intermediate Language Disassembler.

It will open a window as shown below

4

 

In IL DASM window open the MyClassLibrary.dll.

5

It will load the assembly details inside the window.

As you can see, Meta Data shows all the details which are there inside the class, like ID and Name properties as well as fn_Name function which returns the name.

6

If you double click on the MANIFEST then it will show the details about the assembly like version and references used.

8

Note*: Difference between normal command prompt and VS command prompt is, Visual Studio command prompt load the path directly where all the tools are available.

Posted October 1, 2014 by Izharuddin Shaikh in C#

Tagged with

Leave a comment