С#. Assembly theory

Assemblyversioned (for ex., self described( has manifest, links to other external assemblies, info about all types) binary, supported by CLR (Common Language Runtime). One EXE is divided in may exe, dll files.

Assembly defines type borders.  Example.  Both MyCars.dll and YourCars.dll has CarLibrary that has SportsCar class. It will be 2 different classes.

Private assembly – in the same catalogue with client app.

Shared Assembly – in Global Assembly Cache

Assembly consists of:

  • Windows headers file
  • CLR headers file
  • CIL code
  • Types metadata
  • Manifest
  • Additional resources

Windows headers file


how to open it?

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Developer Command Prompt for VS2015

for example

Dump of file C:\C#\MyC#StudyProjects\07_DifferentMains\nameSpaceExamples\nameSpaceExamples\bin\Debug\nameSpaceExamples.exe


CLR Headers file

dumpbin /clrheader C:\C#\MyC#StudyProjects\07_DifferentMains\nameSpaceExamples\nameSpaceExamples\bin\Debug\nameSpaceExamples.exe

CIL code compiled on current platform with JIT (Just in time compiler)

Type metadata – where in binary types ?

Manifest – list of modules, version, all external assemblies

Additional resources for pics and other files. Also satellite assemblies possible.

One file and many files assemblies

module – binary file of .NET

One file assembly Carlibrary.dll

Many files assembly – many files with *.netmodule extension and one main file (*.exe or *.dll) and one version number. Main file and *.netmodules have manifests. it is one logically, but on physics level – many files

Advantage – can be loaded when needed (dynamically), allows use different programming languages (like dll in Delphi).

This entry was posted in C#. Bookmark the permalink.

Leave a Reply