什么是.NET程序集?我在网上浏览了一下,我不明白这个定义。


当前回答

汇编是. net框架编程的基本部分。 它包含CLR在可移植可执行文件中执行MSIL(Microsoft中间语言)代码的代码,如果它没有关联的程序集清单,将不会执行。

其他回答

物理集合类,接口,枚举等,这是在IL代码。可以是。exe或。dll文件。exe是可执行文件,. dll可以在任何。net支持的语言中动态使用。

在.Net中,程序集可以是:

各种可管理部件的集合,其中包含类型(或 类),资源(位图/图像/字符串/文件),命名空间, 私有或公开编译的配置文件;部署到 本地或共享(GAC)文件夹;可被他人发现 项目/程序集和;可以进行版本控制。

Visual Studio解决方案由一个或多个项目组成。例如:控制台项目可以生成程序集。程序集在逻辑上是可以交付给客户的代码块,在物理上是。exe(可执行程序)或。dll(可被其他程序重用)。

MSDN给出了一个很好的解释:

Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

用更简单的术语来说:可以由. net运行时环境执行的(预编译的)代码块。. net程序由一个或多个程序集组成。