InterviewSolution
| 1. |
What is an assembly |
|
Answer» Microsoft .NET Framework application is a primary unit for DEPLOYMENT in Asp.Net.It provides all required execution information to common language runtime so It is called as the BUILDING block of an application. In .NET, there are two kinds of assemblies,
An assembly that contains all information like IL, Metadata, and Manifest in a single package is called as single file assembly. Most of the assemblies in .NET are build up as a single file assemblies. Multiple file assemblies contain the multiple .NET binaries which are generated for bigger applications. In this, there will always be ONE assembly which will contain a manifest and while others will have IL and Metadata instructions. Assembly has the code that the common language runtime(CLR) executes. Microsoft intermediate language (MSIL) code will not be executed the portable executable (PE) file if it does not have an associated assembly manifest. It resides in each and every type’s identity which includes the name of the assembly. A type which is called MyType is loaded in the scope of one assembly and it is not the same as the type which is called MyType which is loaded in the scope of ANOTHER assembly. Assemblies can be of static or dynamic type. Static assemblies are those which include .NET Framework types (interfaces and classes), also if it is having the resources for the assembly (bitmaps, JPEG files, resource files, and so on). it is stored on disk in portable executable (PE) files. We can also create dynamic assemblies using a .NET framework, which can run directly from memory and will not save in the disk before execution. You can save dynamic assemblies to disk after their execution. There are two kinds of assemblies in .NET;
Private assemblies are very simple as they can be easily called upon each time from the assembly folder. Shared assemblies known as a strongly named assembly are copied at a single location (usually GAC). For applications that are using the same assemblies, the same copy of shared assemblies are called from its original location, and hence they are not copied to each applications private folder. Each shared assembly has the four part name which includes its FACE name, version, public key token and culture information. |
|