什么是托管模块(相对于一个组件)? [英] What is a Managed Module (compared to an Assembly)?
问题描述
什么是托管模块在.NET和它是如何从装配有什么不同?是PE文件(如:Test.dll的)一个管理模块或组件?如何组装/管理模块对应的物理磁盘上的文件?
What is Managed Module in .NET and how is it different from Assemblies? Is a PE file (eg. test.dll) a managed module or an assembly? How does assembly/managed module correspond to physical files on disk?
推荐答案
一个管理模块通常被理解为是指只包含IL code模块,没有直接机code。
A Managed module is generally understood to refer to a module that only contains IL code, with no direct machine code.
一个模块装在一个正常的PE文件。
A module is housed in a normal PE file.
这是组装是一组1个或多个模块,其中一个被指定为头(将查找确切的词[1])。虽然对自己的心不是单独多大用处的模块 - 该组件是原子单位
An assembly is a set of 1 or more modules, with one designated as the 'head' (will look up the exact term[1]). A module on its own isnt individually much use though - the assembly is the atomic unit.
例如,你可以有一个multui模块装配有2个dll和一个EXE。多模块组件是非常罕见的,但。
For example, you could have an multui-module assembly with 2 DLLs and an EXE. Multi module assemblies are quite rare though.
唐箱书Esssential .NET,发生里氏CLR通过C#给出了话题的良好覆盖。有关完整的细节,塞尔Lidin .NET 2.0 IL汇编书和CLI标准都比较齐全。
The Don Box book Esssential .NET, the Richter CLR via C# gives good coverage of the topic. For complete details, the Serge Lidin .NET 2.0 IL Assembler book and the CLI standard are more complete.
[1]根据<一href="http://www.programmersheaven.com/2/FAQ-DOTNET-DOTNET-Assembly-Explained">http://www.programmersheaven.com/2/FAQ-DOTNET-DOTNET-Assembly-Explained
的组件可以是单个文件,或者它可以由多个文件。如果多的文件,还有包含清单一个主模块,而其他组件存在非清单模块
An assembly can be a single file or it may consist of the multiple files. In case of multi-file, there is one master module containing the manifest while other assemblies exist as non-manifest modules
要回答的实际问题: -
To answer the actual questions:-
什么是托管模块在.NET和它是如何从装配有什么不同?
What is Managed Module in .NET and how is it different from Assemblies?
有一个子集 - 一个DLL可以是没有子模块的主模块 - 因而是汇编太
It is a subset - a DLL can be a master module with no child modules -- and thus be an assembly too
时的PE文件(如:Test.dll的)一个管理模块或组件?
Is a PE file (eg. test.dll) a managed module or an assembly?
这绝对是一个模块。如果它也有一个清单,无子模块,这也是一个组装
Definitely a module. If it also has a manifest and no child modules, it's also an assembly
如何组装/管理模块对应磁盘上的物理文件? 每个模块是一个文件。 (像ILMerge工具能够合并模块如果你有兴趣)
How does assembly/managed module correspond to physical files on disk? Each module is a file. (Tools like ILMerge can merge modules if you're interested)
这篇关于什么是托管模块(相对于一个组件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!