Module vs Assembly

Using ildasm to see modules and manifest in an assembly

Every day I am learning something new, if not new then I am fixing assumptions. For example I have for years used the term module and assembly interchangbly and that is not quite correct. It only became obvious this last week as a couple of engineers were using the term for very specific scenarios.

So here are notes for future reference.

Assembly

  • In the .NET framework Assembly is the minimum unit of deployment and it is the form of an EXE or a DLL.
  • An assembly can contain one or more files, they can include things like resource files or modules (embedded).
  • An assembly always contains an assembly manifest. Assembly manifest is the metadata of an assembly. It contains assembly definition identity, files in the assembly, type reference information, referenced assemblies (other things I do not know yet).
  • The Assembly Linker (Al.exe) generates a file that has the assembly manifest in it.
  • You can view the topology of an assembly by using the IL Disassembler (ildasm.exe).

Module

  • The code files in an assembly are called modules.
  • A module is a unit of compilation.
  • Module contains type metadata.
  • A module can not be deployed alone, it has to be linked into an assembly (using Al.exe).

I am sure I knew all this in 2005 … but here I am learning it again.



Comment Section

Comments are closed.