whats an assembly 什么是assembly

whats an assembly 什么是assembly


assemblies are a fundamental part of programming with the .NET Framework. An assembly performs the following functions:

It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Note that each assembly can have only one entry point (that is, dllmain, winmain, or main).
It forms a security boundary. An assembly is the unit at which permissions are requested and granted. For more information about security boundaries as they apply to assemblies, see
Assembly Security Considerations
.
It forms a type boundary. Every type's identity includes the name of the assembly in which it resides. A type called MyType loaded in the scope of one assembly is not the same as a type called MyType loaded in the scope of another assembly.
It forms a reference scope boundary. The assembly's manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types and resources that are exposed outside the assembly. The manifest also enumerates other assemblies on which it depends.
It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. The assembly's manifest describes the version dependencies you specify for any dependent assemblies. For more information about versioning, see
Assembly Versioning
.
It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes, can be retrieved on demand. This allows applications to be kept simple and thin when first downloaded. For more information about deploying assemblies, see
Deploying Applications
.
It is the unit at which side-by-side execution is supported. For more information about running multiple versions of an assembly, see
Assemblies and Side-by-Side Execution
.
assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed. 
there are several ways to create assemblies. You can use development tools, such as Visual Studio .NET, that you have used in the past to create .dll or .exe files. You can use tools provided in the .NET Framework SDK to create assemblies with modules created in other development environments. You can also use common language runtime APIs, such as
Reflection.Emit
, to create dynamic assemblies.    (2006-4-12:01:10)

 感谢原创者的辛勤劳动,希望对您有所帮助,转载请注明原出处。
 您可能对 [Asp.Net] 的这些文章也感兴趣:

ASP.NET中Cookie编程的基础知识(3)
ASP.Net实现将Word转换PDF格式
深入剖析ASP.NET的编译原理之二:预编译(Precompilation)
带你走进ASP.NET(3)
DataGrid学习七
一个简单的ASP.NET Forms 身份认证
用Asp.net + NHibernate开发网上书店(附源码)
给web网页加上生成时间,并在页面方法执行或者控件方法执行中查找性能瓶颈
在ASP.NET中创建安全的web站点
利用 XMLHttpRequest 对象实现 ASP.NET 页面局部刷新