解决方法
简而言之,出于以下原因,人们会使用多个模块:
Multi-language assemblies.
If the assembly is consist of source files with different programming languages,you have to compile files with the same programming languages into netmodules,then link them into assemblies.
Separately maintained source files.
If the assembly is maintained by multiple developers,it may make sense to separate the source files into small collections. Each collection is owned by an individual developer. Collections are compiled as netmodules,then linked to the final assembly.
Small download footprint.
If the assembly is hosted in an http site,CLR will only download the main module at the first time. The remaining modules will be downloaded on demand. You can separate the less frequently used code from the main line code,and compiled the less frequently used code as a netmodule. User will only download the netmodule when it is needed.
Link the same source files into multiple assemblies.
You may have some common code that is used in multiple assemblies. The common code is small enough that it is not worth to compile them into a separate assembly. To avoid compiling the same source files multiple times,you can compile them into a netmodule,then link it into different assemblies.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。