Assembly (programming)


title: "Assembly (programming)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["programming-constructs"] topic_path: "general/programming-constructs" source: "https://en.wikipedia.org/wiki/Assembly_(programming)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

In computer programming, an assembly is a runtime unit consisting of types (such as classes and interfaces) and other resources. All types in an assembly share the same version number. An assembly typically corresponds to a single file (such as a .dll or .exe), but can consist of multiple files linked together by a manifest that serves as a table of contents describing the assembly's metadata and structure.

While an assembly often contains types from a single namespace and serves one program, it can span multiple namespaces. Conversely, a single namespace can be distributed across multiple assemblies, providing flexibility in code organization and deployment.

In C#, an assembly is the smallest deployment unit used, and is a component in .NET. In Java, it is a JAR file.

Creation of an assembly

::figure[src="https://upload.wikimedia.org/wikipedia/commons/5/56/Creation_of_assemblies_and_modules.png" caption="Creation of assemblies and modules in C#"] ::

Every compilation creates either an assembly or a module in C#. It is possible to add other modules with the assembly linker (al). A speciality of Java is to create a *.class file for each class, which is not the case in C#. The creation can be activated by compiler switches, like csc /addmodule:Y.netmodule A.cs that yields a new A.exe with Y added to this assembly. | accessdate = 2011-08-05 | date = 2002-03-25 | first = Hanspeter | last = Mössenböck | pages = 38–40 | publisher = Institut für Systemsoftware, Johannes Kepler Universität Linz, Fachbereich Informatik | title = Advanced C#: Variable Number of Parameters | url = http://ssw.jku.at/Teaching/Lectures/CSharp/Tutorial/Part2.pdf}}

References

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

programming-constructs