In addition to existing answers:
First of all, files like .EXE and .DLL are not assemblies. They are all
executable files in the form of PE file. From the .NET standpoint, they are
modules of the assemblies, not assemblies themselves.
Please see:
https://en.wikipedia.org/wiki/Portable_Executable[
^],
https://en.wikipedia.org/wiki/Assembly_%28CLI%29[
^].
One of the main contributors to the common confusion is Visual Studio, which directly support only the assemblies with only one module. But you can develop with just the compiler, which allows to create a module, not assembly, and then put module together and give
assembly manifest only to one module. This way, an assembly will have several files, all being executable modules of the same assembly.
Still,
reflection allows you to load and assembly and see what are the modules, so the possibility of having several modules is in the .NET BCL. See also:
https://en.wikipedia.org/wiki/Manifest_(CLI)[
^].
Also, it's good to know that there is not essential difference between .EXE and .DLL. They are just naming conventions. Normally, there are library assemblies which are allowed to be compiled without
entry point (
Main
method). It's not very obvious fact, but EXE assemblies can be referenced exactly as libraries (DLL assemblies). There are even cases when it can be a useful programming technique.
—SA