👉 Read the full lesson on DevLadder (free, lesson 4 of 11 in the .NET Internals: CLR, CTS, CLS, IL, JIT, Memory Management & Garbage Collection course)

An assembly is the unit of deployment, versioning and security: a .dll or .exe containing:

Part Contains
PE header Windows/OS executable format
CLR header Runtime version, entry point, flags
Metadata Every type, method, field, parameter, attribute and referenced member: what reflection and IntelliSense read
IL code Method bodies
Manifest Assembly identity (name, version, culture, public key token), list of files, referenced assemblies
Resources Embedded files, localised strings

Kinds: private assemblies (in the app folder, the norm today), shared assemblies in the GAC (Global Assembly Cache, .NET Framework only, C:\Windows\Microsoft.NET\assembly), satellite assemblies (localised resources, fr\MyApp.resources.dll).

The full lesson goes on to cover: Strong name, AppDomain vs AssemblyLoadContext.

Continue reading the lesson →

An interview question on .NET Internals

What is the difference between .NET Framework, .NET Core and .NET 5+?

.NET Framework (2002–2019) is Windows-only, installed machine-wide, and now only maintained (4.8.1 last); it has Web Forms, WCF and WWF. .NET Core (2016–2019) was the open-source, cross-platform, high-performance rewrite. .NET 5 (2020) onward unifies them as simply ".NET", released every November with LTS versions (6, 8, 10) supported for 3 years. New projects use .NET 8/10.

Can you answer these?

  • What is managed vs unmanaged code?
  • What is an assembly? What does it contain?
  • Explain how the garbage collector works. What are generations?
  • Dispose vs Finalize: what's the difference? What is the Dispose pattern?

The answers, plus 11 more .NET Internals interview questions and a mock-interview mode, are free on DevLadder.

Next in the course: Stack, heap and how value and reference types are laid out →