Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
what is difference between assembly and ddl dll in asp.net
please help me
thanks your
regards
joti parkash
Posted
Updated 8-Dec-11 18:41pm
v2

It might seem surprising, but there is no a special notion of DLL in .NET. This is essentially no more than a four letters ending the file name. The central concept is "assembly" which is composed of one or more executable "modules" (don't mix up modules with assemblies referenced by another assembly). A DLL developed in .NET is just an executable module.

There are two notes about it. First, Visual Studio supports only the creation of a single-module assembly. The .NET libraries however make clear difference. You can load an assembly using Reflection and find out its modules. Compilers used directly can create modules and compose the into assemblies.

Another thing is this: a DLL "extension" (in NTFS there are no real extensions — thanks goodness; an extension is merely an end of a file name) is used for class libraries, and EXE — for applications. This is only a Visual Studio default. The file name of an assembly executable module can be anything.

Now, the classification into applications and libraries does not have fundamental character. Essentially, any application's entry assembly (what is usually called EXE, but we remember that this is only a main module) is just a class library. Absolutely every assembly is a class library.

Moreover, any "EXE" assembly can be referenced by any other assembly like any other library. This is not very usual, but is used sometimes in plug-in architectures. Instead of using a separate plug-in interface library, such library is implemented as a part of the host application. In such settings, a "DLL" (plug-in) references the host ("EXE"), so the host assembly is used twice: as a referenced assembly and an entry assembly of application. It never causes any problem. The only difference of application assembly is having an entry point method ("Main").

From the other hand, non-EXE assemblies can be used as applications. You can create an alternative host with different entry types, using your own custom interfaces. Assemblies which cannot be uses as applications loaded normally via the Shell could be loaded using alternative method and alternative host.

[EDIT] See also: Assembly, DLL and EXE[^].

—SA
 
Share this answer
 
v4
Comments
Uday P.Singh 9-Dec-11 1:11am    
Agree 5+
Sergey Alexandrovich Kryukov 9-Dec-11 1:22am    
Thank you, Uday.
--SA
Manoj K Bhoir 9-Dec-11 1:30am    
Fantastic Explanation! My 5+
Sergey Alexandrovich Kryukov 9-Dec-11 1:43am    
Nothing but truth :-)
Thank you, Manoj.
--SA
uspatel 9-Dec-11 1:34am    
my 5!
In
Quote:
the .NET framework, an assembly is a compiled code library used for deployment, versioning, and security. There are two types: process assemblies (EXE) and library assemblies (DLL).

http://en.wikipedia.org/wiki/.NET_assembly[^]

exe can be executed directly but dlls cannot.
 
Share this answer
 
v2
As SA said: DLL is no any term in .Net rather than these are windows(OS) component.

DLL:A Windows DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries.

Assembly[^]:an assembly is a compiled code library used for deployment, versioning, and security. There are two types: process assemblies (EXE) and library assemblies (DLL).

hope it helps :)
 
Share this answer
 
Assembly :
An assembly is the unit of deployment and security for managed code projects. It is a .NET Component and can be used only in .NET managed applications.

Compiled code at run time is an assembly and After compilation of the requested ASP.NET file is complete, the assembly is loaded into the application domain, allowing late binding.

Codes in APP_Code folder during compilation will become one assembly.

Assembly present in bin can have either strong/weak Name and assembly in GAC Should have strong name.

Dll :
DLL contains library code to be used by any program running on Windows. A DLL may contain either structured or object oriented libraries.



In .NET, an assembly may become a DLL or an EXE. Yet, there is a major underlying difference between the two.

An EXE is an executable file, that may run on its own. Its independant. Where as a DLL is a Dynamic Link Library, that binds to an exe, or another DLL at runtime.

A DLL has an exposed interface, through which members of the assembly may be accessed by those objects that require it.

A DLL runs in tandem with the application space in memory, as the application references it. Whereas an EXE is independant, and runs as an independant process.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900