Combine managed modules into an assembly

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.