http://www00.zdnet.com.cn:88/developer/tech/story/0,2000081602,39032727,00.htm
http://www.zdnet.com.cn/developer/code/story/0,2000081534,39144141-2,00.htm
http://www.microsoft.com/china/seminar/ppt/MSCLUB/July/0704-BJ-1-architect.ppt

解决方案 »

  1.   

    定义一个 Assembly,它是可重用、无版本冲突并且可自我描述的公共语言运行库应用程序构造块。程序集提供使运行库能够充分了解应用程序的内容并强制使用应用程序定义的版本控制和依赖项规则的结构。这些概念对解决版本控制问题和简化运行库应用程序的部署至关重要。
    An assembly is a logical package (similar to a DLL in Win32) that consists of a manifest, a set of one or more modules, and an optional set of resources. This package forms the basic unit of deployment and versioning, and creates a boundary for type resolution and security permissioning.Every .NET application consists of at least one assembly, which is in turn built from a number of basic elements.The manifest contains a set of metadata that describes everything the runtime needs to know about the assembly. This information includes:
    ·  The textual name of the assembly
    ·  The version number of the assembly
    ·  An optional shared name and signed assembly hash
    ·  The list of files in the assembly with file hashes
    ·  The list of referenced assemblies, including versioning information and an optional public key
    ·  The list of types included in the assembly, with a mapping to the module containing the type
    ·  The set of minimum and optional security permissions requested by the assembly
    ·  The set of security permissions explicitly refused by the assembly
    ·  Culture, processor, and OS information
    ·  A set of custom attributes to capture details such as product name, owner information,etc.
    Modules contain types described using metadata and implemented using MSIL.
    Resources contain nonexecutable data that is logically included with the assembly. Examples of this include bitmaps, localizable text, persisted objects, etc.
     Packaging
    The simplest assembly contains a manifest and a single module containing the application's types, packaged as an EXE with a Main entry point. More complex assemblies can include multiple modules ( Portable Executable (PE) files), separate resource files, a manifest, etc.
    The manifest is generally included in one of the existing PE files in the assembly, although the manifest can also be a standalone PE file.
    Modules are PE files, typically DLLs or EXEs. Only one module in an assembly can contain an entry point (either Main, WinMain, or DllMain).
    An assembly may also contain multiple modules. This technique can reduce the working set of the application, because the CLR loads only the required modules. In addition, each module can be written in a different language, allowing a mixture of C#, VB.NET, and raw MSIL. Although not common, a single module can also be included in several different assemblies.
    Finally, an assembly may contain a set of resources, which can be kept either in standalone files or included in one of the PE files in the assembly.
    Deployment
    An assembly is the smallest .NET unit of deployment. Due to the self-describing nature of a manifest, deployment can be as simple as copying the assembly (and in the case of a multifile assembly, all the associated files) into a directory.
    This is a vast improvement over traditional COM development in which components, their supporting DLLs, and their configuration information are spread out over multiple directories and the Windows registry.
    Generally, assemblies are deployed into the application directory and are not shared. These are called private assemblies. However, assemblies can also be shared between applications; these are called shared assemblies. To share an assembly you need to give it a shared name (also known as a "strong" name) and deploy it in the global assembly cache.
    The shared name consists of a name, a public key, and a digital signature. The shared name is included in the assembly manifest and forms the unique identifier for the assembly.
    The global assembly cache is a machine-wide storage area that contains assemblies intended for use by multiple applications.