EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Software Development What is assembly?
 

What is assembly?

Updated April 18, 2023

What is assembly?

 

 

What is assembly?

Assembly is nothing but a collection of types and references that form logical unit of functionality. All types in asp.net framework must exist in assemblies; the common language runtime does not support types outside of assemblies. Assembly is automatically created when you create a Microsoft Windows application, windows service, or any class library. An assembly is stored as an .exe or .dll file.

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

Why do we need assembly?

The main goal of assembly is the elimination of DLL Hell. Under the current COM or COM+ model, a catalog of DLLs is centralized in the windows registry. When a new version of DLL is published, the registry re-references the catalog you point to the new DLl. This centralized registration paradigm makes it challenging for multiple applications to depend on the same DLL. Most often the application binds to a DLL in a centralized location, rather than run multiple versions of components by using side-by-side execution. The .net framework makes it easy to run multiple versions of components because it stores assemblies in local application directories by default. This isolate the assembly from use by any other application and protects the assembly from system changes.

Assembly Components

Components of assembly are as follows

  1. Assembly manifest: It is a section of the assembly which contains metadata about the assembly. It is considered as a header section of the assembly as it contains information like version number, publisher, information about encryption, etc. Assembly manifest can be stored in either a PF file i.e .exe or .dll with Microsoft Intermediate Language (MSIL) code or in standard PE file that contains only assembly manifest information.
  2. MSIL source code: MSIL contains information about initialization, loading, storing, and calling methods on objects. It also stores the instructions about the operation like arithmetic and logical operation, memory access, control flow, exception handling, etc. MSIL is platform-independent, which means source code of MSIL can be executed on any platform with .net framework support and JIT compiler. JIT compiler convert the code into machine-specific object code.
  3. Type metadata: Type metadata describes the format of contained types and external types referenced by the assembly. After executing the code, CLR loads the metadata into memory and drives the information about classes, attributes, their members, etc.
  4. Resources: .net framework consists of main assembly that contains various resources like sounds clips, string, images, and icons, etc.

Types of assembly

Based on the deployment processs of assembly, it is categorized into two categories, one is private assemblies and another is shared assemblies.

Private assemblies: It is also known as local assemblies. Private assembly is created when you make a class library to be used with your application and not designed to work with every .net application. Any application which is dependent on private assembly gets a local copy of the dll kept alongside the executables of the project in the bin folder of the project.

Shared assemblies: When you write a class library which could be used with any .net application on the system, it would be nice to have one common copy shared between all applications. This would update the assemblies easier. Such assemblies are known as global assemblies. They are kept on a standard location on the machine called as GAC. All .net framework assemblies are global and get installed in GAC when you install .net framework.

How does assembly works?

  • Assembly contains code the common language runtime executes. MSIL code in PF file. i.e portable executable will not be executed if it does not have associated assembly manifest. Each assembly can have only one entry point.
  • Assembly provides security as it is the unit at which permission are requested and granted.
  • It forms deployment unit. When 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. It allows the application to be kept simple and thin when first downloaded.
  • It is the unit at which side-by-side execution is supported.
  • Assembly provides boundary to type: Every type of identity includes the name of the assembly in which it resides. A type is called a type example, loaded in the scope of one assembly is no the same as type called type example loaded in the scope of another assembly.
  • It forms a version boundary. Assembly ks the smallest versionable unit in the common language runtime. All types and resources in the same assemblies are versioned as. unit. The assembly manifest describes the version dependencies you specify for any dependent assemblies.
  • Assembly provides boundary to the scope of assembly manifest contains assembly metadata that is used for resolving types and stratifying resource requests.

Conclusion

Here in this article, we have discussed the basic concepts of assembly with its components and types. We have also discussed the working of assemblies. Hope you enjoyed the article.

Recommended Articles

This is a guide to What is assembly?. Here we discuss Why do we need assembly? , Types of assembly, How does assembly works? respectively. You may also have a look at the following articles to learn more –

  1. What is Edge Computing?
  2. What is Remote Access?
  3. What is Social Media?
  4. What is Telegram?

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA Login

Forgot Password?

🚀 Limited Time Offer! - 🎁 ENROLL NOW