What is an assembly

Alright now that you know the compilation model for applications built using the .net framework let’s talk about what happens at the end of the compilation. At the end of the compilation you get an assembly. Yes, all the source code which you write is compiled and finally assembled into a single file called an assembly.

.net assembly

Assemblies are the building blocks of a .net application. They are the smallest and fundamental unit deployment in a .net application. Many assemblies come together to complete an application, just like many hardware components come together and make a computer system.

There are only two types of assemblies in .net – a dll and an exe. So it won’t be wrong to say that at the end of the compilation cycle for your .net application you will either get a dll file or an exe file. Both of these are called assemblies.

Difference between dll and exe

The only difference between a dll and an exe assembly is that the first one is a non executing assembly whereas the second one is an executable assembly. A dll cannot execute on its own but the compiled code inside it can be used by another exe file and be executed. Whereas an exe file can be executed on its own.

What is inside the assembly?

Inside the assemblies is all of your source code in the compiled format. Let’s say if you have a .net project with 100 classes then all these classes will be compiled and added to a single assembly. If you organize your classes into different namespaces then they will follow the same organization after compilation also.

Pictorial representation of an assembly

In the very simple format this is what you have inside a dll or an exe file. Please keep in mind that there are other things also like the assembly manifest which provides additional information about the assembly, but here we are just showing things which will help you understand .net assemblies from a programmer perspective.

.net assembly

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp