In the .NET framework, an assembly is a compiled code library used for deployment, versioning, and security.
There are two types:
1.process assemblies (EXE) and
2.library assemblies (DLL).
A process assembly represents a process which will use classes defined in library assemblies. .NET assemblies contain code in CIL, which is usually generated from a CLI language, and then compiled into machine language at run time by the CLR just-in-time compiler.
An assembly can consist of one or more files. Code files are called modules. An assembly can contain more than one code module and since it is possible to use different languages to create code modules it is technically possible to use several different languages to create an assembly. Visual Studio however does not support using different languages in one assembly.
http://en.wikipedia.org/wiki/.NET_assembly
An assembly is a file that is automatically generated by the compiler upon successful compilation of every .NET application.
It can be either a Dynamic Link Library or an executable file.
It is generated only once for an application and upon each subsequent compilation the assembly gets updated.
The entire process will run in the background of your application; there is no need for you to learn deeply about assemblies. However, a basic knowledge about this topic will help you to understand the architecture behind a .NET application.
The assembly also contains metadata that is known as assembly manifest.
The assembly manifest contains data about the versioning requirements of the assembly, like author name of the assembly, the security requirements to run and the various files that form part of the assembly.
When you compile your source code by default the exe/dll generated is actually an assembly.
More accurately, an assembly is the primary unit of deployment, security, and version control in the .NET Framework.
Advantages of Assemblies:-
- ASP.Net assemblies has a lot of good advantages when compare to conventional DLLs that the developers use to develop earlier. In the case of DLLs if a DLL has to be shared with some other application, it has to be registered in that particular machine. But, In the case of Asp.net assemblies there is no such type of registration required. Here we just need to do is to copy the assembly and put in the bin directory of the application that is going to use it.
- If we need to share a particular assembly with any other applications., we can do so by placing the assembly in the Global Assembly Cache (GAC). But before we going to do it we need to give a strong name to that assembly.Strong name is similar to GUID(It is supposed to be unique in space and time) in COM, components.Strong Name is only needed when we need to deploy assembly in Global Assembly Cache (GAC).Strong Names helps GAC to differentiate between two versions.Strong names use public key cryptography (PKC) to ensure that no one can spoof it.PKC use public key and private key concept.
- Another advantage of using ASP.Net assemblies is the ability to read the contents of an assembly. Each assembly has a manifest that has details about the assembly itself.
- The System.Reflection namespace has classes like Assembly which can be used to get the details of the assembly and with that it is also possible to load an assembly dynamically at runtime.
Go through the below link for detailed information about assemblies:
http://msdn.microsoft.com/en-us/library/hk5f40ct%28v=vs.71%29.aspx
--