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.
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.
2) Create a class as MyClass and create the properties and function as per below
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).
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
In IL DASM window open the MyClassLibrary.dll.
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.
If you double click on the MANIFEST then it will show the details about the assembly like version and references used.
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.