CLR does not directly deal with managed modules, but with assembly. An assembly is an abstract concept that is hard to grasp at the beginning.
First, an assembly is a logical combination of one or more managed modules or resource files.
Second, an assembly is the smallest unit of reuse, security, and version control. depending on your compiler or tool, you can generate single or multi-file assembly. in the CLR world, an assembly is called a component ).
It will help explain what is an assembly. in this figure, some managed module and resource (or data) files are processed using a single tool. this tool generates a pe32 (+) file, which represents the logical combination of the file. this pe32 (+) file contains a data block called manifest, which is another set of metadata tables that describe the files that make up the assembly, and assembly-related resources and data files.
By default, the compiler actually combines managed modules into an Assembly. That is to say, the C # Compiler's managed module contains a manifest, which indicates that the Assembly contains only one file, therefore, for projects with only one managed module and no resources (or data) files, an assembly is a managed module. You do not need to take any additional steps to build an assembly. if you want to combine a group of files into a set of programs, you must use more tools (such as assembly and connection machines, al.exe) and their command line compilation options.
An assembly allows you to separate reusable, deployable, and versionable component logical and physical representations. it is up to you to separate your code and resources into different files. for example, you can put seldom used types or resources into a single file and construct an assembly. this separate file can be put on the web for people to download. if this file is never used, it will never be downloaded, saving disk space and installation time. the Assembly allows you to split the file deployment method, but still uses all the files as a separate collection.
An assembly module also contains information about the referenced assembly (including their version numbers ). this information allows an assembly to be self-described (self-describing ). in other words, CLR can determine the dependent information of the assembly, without obtaining information from the registry or the Microsoft Active Directory Service. because no additional information is required, it is easier to deploy an assembly than to deploy an unmanaged component.