#179 – What Is an Assembly?

As a .NET language, C# compiles code into assemblies. An assembly is a reusable piece of code, packaged into either an .exe or .dll file.  It contains IL (Intermediate Language) code that the CLR (Common Language Runtime) will compile into machine code at runtime.

An assembly contains a manifest, which defines high-level attributes of the assembly including its name, version, copyright information and an optional strong name that uniquely identifies it.

Assemblies also contain metadata, representing a complete description of all of the contained types.  The metadata includes a description of each method and property of each type implemented in the assembly, along with information about the parameters and return type.  An assembly also includes a list of other assemblies that it references.

An assembly is typically packaged as a single .exe or .dll file, but can also be spread across more than one file.


About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

3 Responses to #179 – What Is an Assembly?

  1. Pingback: #467 – Metadata « 2,000 Things You Should Know About C#

  2. Pingback: #530 – Namespaces vs. Assemblies « 2,000 Things You Should Know About C#

  3. kai zhou says:

    Assemblies(.dll or .exe) contain:

    (1) IL(be compiled into machine codes by the CRL)
    (2) manifest(high-level attributes)
    (3) metadata(a complete description of all contained types, parameters, return types)
    (4) a strong name(optional)
    (5) any other referenced assemblies

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: