Wednesday, August 7, 2013

What are .NET Assemblies? What is the difference between Private, Shared and Satellite Assembly? How to view Assemblies meta data?

In any programming environment, it is actually essential to be able to encapsulate dedicated functionality in libraries. We like to build such modules that can be kept at one place and used in different locations. To achieve this, “Assemblies” concept has been introduced into .net framework that can be part of a single or shared application.

Assemblies are primary building blocks of .NET Framework applications that contain Metadata, manifest and Intermediate Language Code. They form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations.

An assembly performs following key functions:

1. It contains MSIL code and assembly manifest that the common language runtime executes. Each assembly can have only one entry point (that is; DllMain, WinMain, or Main).
2.  An assembly is the unit that forms a security boundary at which certain permissions are requested or granted that assembly requires.
3.  It forms a type boundary which means every type's identity includes the name of the assembly in which it resides. A type called TypeA loaded in the scope of one assembly is different than a type called TypeA loaded in the scope of another assembly.
4.  It forms a reference scope boundary. The assembly's manifest contains assembly metadata that is used for resolving types and filling resource requests. It identifies the types and resources that are exposed outside the assembly. The manifest also counts other assemblies on which it depends.
5.  It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. The assembly's manifest describes the version dependencies you specify for any dependent assemblies.
6. It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes can be retrieved on demand. This allows applications to be kept simple and thin when first called. 
7. It is the unit at which side-by-side storage and execution of multiple versions of an application or component is supported by different versions of the same assembly.

There are three types of assemblies as:

a. Private Assemblies: are accessible by a single application. They reside within the application folder and are unique by name. They can be directly accessed by keeping them to the bin folder.
b. Shared or Public Assemblies: are shared between numerous applications to ensure reusability. They are located in Global Assembly Cache.
c. Satellite Assemblies: are assemblies to provide support for multiple languages based on diverse cultures. These are kept in different modules based on the different categories available.

View Assemblies Meta Data:

Assemblies meta data can viewed with all the methods and types in a tree representation by the tool Intermediate Language Disassembler (ILDASM).

7 comments:

  1. It's remarkable to pay a quick visit this website and reading the views of all mates about this piece of writing, while I
    am also zealous of getting know-how.

    Here is my website :: Star Wars Rebel Recon Hack

    ReplyDelete
  2. Thanks for any other magnificent article.
    Where else could anyone get that kind of info in such a
    perfect approach of writing? I have a presentation next week, and I'm at the look for such info.



    my web-site free minecraft games

    ReplyDelete
  3. Why viewers still make use of to read news papers when in this technological globe all is presented on net?



    Here is my site ... ez pz rpg hack tool

    ReplyDelete
  4. Aw, this was a really nice post. Taking the time and actual effort
    to create a great article… but what can I say… I hesitate a lot and
    don't manage to get anything done.

    Here is my site - terminator genisys revolution hack Tool

    ReplyDelete
  5. you are in reality a excellent webmaster. The website loading pace is incredible.
    It kind of feels that you're doing any distinctive trick.
    Moreover, The contents are masterwork. you've done a fantastic activity in this subject!



    Here is my web-site - hook your Ex system Pdf

    ReplyDelete
  6. Do you have any video of that? I'd care to find
    out more details.

    My weblog; jurassic world the game hack tool no survey

    ReplyDelete