.NET 术语表.NET Glossary

此术语表的主要目的是阐明所选术语和缩写词的含义,这些词频繁出现在 .NET 文档中但没有定义。The primary goal of this glossary is to clarify meanings of selected terms and acronyms that appear frequently in the .NET documentation without definitions.

AOTAOT

预编译器。Ahead-of-time compiler.

JIT 类似,此编译器还可将 IL 转换为机器代码。Similar to JIT, this compiler also translates IL to machine code. 与 JIT 编译相比,AOT 编译在应用程序执行前进行并且通常在不同计算机上执行。In contrast to JIT compilation, AOT compilation happens before the application is executed and is usually performed on a different machine. AOT 工具不会在运行时进行编译,因此它们不需要最大程度地减少编译所花费的时间。Because AOT tool chains don't compile at run time, they don't have to minimize time spent compiling. 这意味着它们可花更多的时间进行优化。That means they can spend more time optimizing. 由于 AOT 的上下文是整个应用程序,因此 AOT 编译器还会执行跨模块链接和全程序分析,这意味着之后会进行所有引用并会生成单个可执行文件。Since the context of AOT is the entire application, the AOT compiler also performs cross-module linking and whole-program analysis, which means that all references are followed and a single executable is produced.

请参阅 CoreRT.NET NativeSee CoreRT and .NET Native.

应用模型app model

特定于工作负载的 API。A workload-specific API. 下面是一些示例:Here are some examples:

  • ASP.NETASP.NET
  • ASP.NET Web APIASP.NET Web API
  • 实体框架 (EF)Entity Framework (EF)
  • Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)
  • Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
  • Windows Workflow Foundation (WF)Windows Workflow Foundation (WF)
  • Windows 窗体 (WinForms)Windows Forms (WinForms)

ASP.NETASP.NET

随 .NET Framework 一起提供的原始 ASP.NET 实现。The original ASP.NET implementation that ships with the .NET Framework.

有时 ASP.NET 是一个涵盖性术语,指包含 ASP.NET Core 在内的两个 ASP.NET 实现。Sometimes ASP.NET is an umbrella term that refers to both ASP.NET implementations including ASP.NET Core. 该术语在任何给定实例中的含义取决于上下文。The meaning that the term carries in any given instance is determined by context. 若要指明不要使用 ASP.NET 来表示这两种实现,请参考 ASP.NET 4.x。Refer to ASP.NET 4.x when you want to make it clear that you're not using ASP.NET to mean both implementations.

请参阅 ASP.NET 文档See ASP.NET documentation.

ASP.NET CoreASP.NET Core

一种跨平台、高性能的开放源代码 ASP.NET 实现。A cross-platform, high-performance, open-source implementation of ASP.NET.

请参阅 ASP.NET Core 文档See ASP.NET Core documentation.

程序集 (assembly)assembly

.dll/.exe 文件,其中包含一组可由应用程序或其他程序集调用的 API。A .dll/.exe file that can contain a collection of APIs that can be called by applications or other assemblies.

程序集可以包括接口、类、结构、枚举和委托等类型。An assembly may include types such as interfaces, classes, structures, enumerations, and delegates. 有时,项目的 bin 文件夹中的程序集被称为二进制文件。Assemblies in a project's bin folder are sometimes referred to as binaries. 另请参阅See also library.

BCLBCL

基类库。Base Class Library.

一组构成 System.*(在一定的程度上构成 Microsoft.*)命名空间的库。A set of libraries that comprise the System.* (and to a limited extent Microsoft.*) namespaces. BCL 是用于生成 ASP.NET Core 等较高级应用程序框架的较低级通用框架。The BCL is a general purpose, lower-level framework that higher-level application frameworks, such as ASP.NET Core, build on.

.NET 5(和 .NET Core)及更高版本的 BCL 的源代码包含在 .NET 运行时存储库中。The source code of the BCL for .NET 5 (and .NET Core) and later versions is contained in the .NET runtime repository. 这些 BCL API 中的大多数也可以在 .NET Framework 中获取,因此可将此源代码视为 .NET Framework BCL 源代码的一个分支。The majority of these BCL APIs are also available in .NET Framework, so you can think of this source code as a fork of the .NET Framework BCL source code.

以下术语通常指 BCL 引用的相同 API 集合:The following terms often refer to the same collection of APIs that BCL refers to:

CLRCLR

公共语言运行时。Common Language Runtime.

具体含义依赖于上下文。The exact meaning depends on the context. 公共语言运行时通常指 .NET Framework.NET 5(和 .NET Core)及更高版本的运行时。Common Language Runtime usually refers to the runtime of .NET Framework or the runtime of .NET 5 (and .NET Core) and later versions.

CLR 处理内存分配和管理。A CLR handles memory allocation and management. CLR 也是一种虚拟机,不仅可执行应用,还可使用 JIT 编译器快速生成和编译代码。A CLR is also a virtual machine that not only executes apps but also generates and compiles code on-the-fly using a JIT compiler.

适用于 .NET Framework 的 CLR 实现仅限于 Windows。The CLR implementation for .NET Framework is Windows only.

.NET 5 及更高版本的 CLR 实现(也称为 Core CLR)是基于与 .NET Framework CLR 相同的代码库而构建的。The CLR implementation for .NET 5 and later versions (also known as the Core CLR) is built from the same code base as the .NET Framework CLR. Core CLR 最初是 Silverlight 的运行时,并且设计为在多个平台上运行,尤其是在 Windows 和 OS X 上运行。它仍是跨平台运行时,现在包括对许多 Linux 分发的支持。Originally, the Core CLR was the runtime of Silverlight and was designed to run on multiple platforms, specifically Windows and OS X. It's still a cross-platform runtime, now including support for many Linux distributions.

另请参阅运行时See also runtime.

Core CLRCore CLR

.NET 5(和 .NET Core)及更高版本的公共语言运行时。The Common Language Runtime for .NET 5 (and .NET Core) and later versions.

请参阅 CLRSee CLR

CoreRTCoreRT

CLR 相比,CoreRT 不是虚拟机,这意味着它不包含用于快速生成并运行代码的功能,因为它不包括 JITIn contrast to the CLR, CoreRT is not a virtual machine, which means it doesn't include the facilities to generate and run code on-the-fly because it doesn't include a JIT. 但它包含 GC 以及运行时类型标识 (RTTI) 和反射功能。It does, however, include the GC and the ability for run-time type identification (RTTI) and reflection. 只是由于设计有类型系统,因此并不需要元数据反射功能。However, its type system is designed so that metadata for reflection isn't required. 不需要元数据使它具有 AOT 工具链,该工具链可去除多余的元数据,更重要的是可识别应用不使用的代码。Not requiring metadata enables having an AOT tool chain that can link away superfluous metadata and (more importantly) identify code that the app doesn't use. CoreRT 正在开发中。CoreRT is in development.

请参阅 .NET Native 和 CoreRT 简介See Intro to .NET Native and CoreRT.

跨平台cross-platform

能够开发并执行可在多个不同操作系统(如 Linux、Windows 和 iOS)上使用的应用程序,而无需专门针对每个操作系统进行重新编写。The ability to develop and execute an application that can be used on multiple different operating systems, such as Linux, Windows, and iOS, without having to rewrite specifically for each one. 这样,可以在不同平台上的应用程序之间重复使用代码并保持一致性。This enables code reuse and consistency between applications on different platforms.

生态系统ecosystem

所有针对给定技术生成和运行应用程序的运行时软件、开发工具和社区资源。All of the runtime software, development tools, and community resources that are used to build and run applications for a given technology.

在所包含的第三方应用和库方面,术语“.NET 生态系统”不同于类似的“.NET 堆栈”等术语。The term ".NET ecosystem" differs from similar terms such as ".NET stack" in its inclusion of third-party apps and libraries. 请看以下这一句示例:Here's an example in a sentence:

  • “推出 .NET Standard 的背后动机是要提高 .NET 生态系统中的一致性。”"The motivation behind .NET Standard is to establish greater uniformity in the .NET ecosystem."

框架framework

一般指一个综合 API 集合,便于开发和部署基于特定技术的应用程序。In general, a comprehensive collection of APIs that facilitates development and deployment of applications that are based on a particular technology. 从此常规意义上来说,ASP.NET Core 和 Windows 窗体都是示例应用程序框架。In this general sense, ASP.NET Core and Windows Forms are examples of application frameworks. 另请参阅See also library.

“框架”一词在以下术语中有不同的含义:The word "framework" has a different meaning in the following terms:

有时,“框架”指的是 .NET 实现Sometimes "framework" refers to an implementation of .NET. 例如,某文章可能会将 .NET 5 称为框架。For example, an article may call .NET 5 a framework.

框架库framework libraries

含义取决于上下文。Meaning depends on context. 可指适用于 .NET 5(和 .NET Core)及更高版本的框架库,在这种情况下,它指 BCL 引用的相同的库。May refer to the framework libraries for .NET 5 (and .NET Core) and later versions, in which case it refers to the same libraries that BCL refers to. 它也可指在 BCL 上构建并为 Web 应用提供其他 API 的 ASP.NET Core 框架库。It may also refer to the ASP.NET Core framework libraries, which build on the BCL and provide additional APIs for web apps.

GCGC

垃圾回收器。Garbage collector.

垃圾回收器是自动内存管理的实现。The garbage collector is an implementation of automatic memory management. GC 可释放不再使用的对象占用的内存。The GC frees memory occupied by objects that are no longer in use.

请参阅垃圾回收See Garbage Collection.

ILIL

中间语言。Intermediate language.

C# 等较高级的 .NET 语言编译为称为中间语言 (IL) 的硬件无关性指令集。Higher-level .NET languages, such as C#, compile down to a hardware-agnostic instruction set, which is called Intermediate Language (IL). IL 有时被称为 MSIL (Microsoft IL) 或 CIL(通用 IL)。IL is sometimes referred to as MSIL (Microsoft IL) or CIL (Common IL).

JITJIT

实时编译器。Just-in-time compiler.

AOT 类似,此编译器将 IL 转换为处理器可理解的计算机代码。Similar to AOT, this compiler translates IL to machine code that the processor understands. 与 AOT 不同,JIT 编译在需要运行代码的同一台计算机上按需执行。Unlike AOT, JIT compilation happens on demand and is performed on the same machine that the code needs to run on. 由于 JIT 编译在应用程序的执行过程中发生,因此编译时是运行时的一部分。Since JIT compilation occurs during execution of the application, compile time is part of the run time. 因此,JIT 编译器需要平衡优化代码所花费的时间与生成代码时可节约的时间。Thus, JIT compilers have to balance time spent optimizing code against the savings that the resulting code can produce. 但 JIT 知道实际硬件,这样开发人员就无需提供不同的实现。But a JIT knows the actual hardware and can free developers from having to ship different implementations.

.NET 实现implementation of .NET

.NET 的实现包括:An implementation of .NET includes:

  • 一个或多个运行时。One or more runtimes. 示例:CLRCoreRTExamples: CLR, CoreRT.
  • 实现 .NET Standard 的某版本并且可能包含其他 API 的类库。A class library that implements a version of .NET Standard and may include additional APIs. 示例:.NET Framework.NET 5(和 .NET Core)及更高版本BCLExamples: the BCLs for .NET Framework and .NET 5 (and .NET Core) and later versions.
  • 可选择包含一个或多个应用程序框架。Optionally, one or more application frameworks. 示例:ASP.NET、Windows 窗体及 WPF 包含在 .NET Framework 和 .NET 5 中。Examples: ASP.NET, Windows Forms, and WPF are included in the .NET Framework and .NET 5.
  • 可包含开发工具。Optionally, development tools. 某些开发工具在多个实现之间共享。Some development tools are shared among multiple implementations.

.NET 实现的示例:Examples of .NET implementations:

library

可由应用或其他库调用的 API 集合。A collection of APIs that can be called by apps or other libraries. .NET 库由一个或多个程序集组成。A .NET library is composed of one or more assemblies.

词库和框架通常作同义词使用。The words library and framework are often used synonymously.

MonoMono

Mono 是主要在需要小型运行时使用的开放源、跨平台 .NET 实现。Mono is an open source, cross-platform .NET implementation that is mainly used when a small runtime is required. 它是在 Android、Mac、iOS、tvOS 和 watchOS 上为 Xamarin 应用程序提供技术支持的运行时,主要针对内存占用少的应用程序。It is the runtime that powers Xamarin applications on Android, Mac, iOS, tvOS, and watchOS and is focused primarily on apps that require a small footprint.

它支持所有当前已发布的 .NET Standard 版本。It supports all of the currently published .NET Standard versions.

以前,Mono 实现更大的 .NET Framework API 并模拟一些 Unix 上最常用的功能。Historically, Mono implemented the larger API of the .NET Framework and emulated some of the most popular capabilities on Unix. 有时使用它运行依赖 Unix 上的这些功能的 .NET 应用程序。It is sometimes used to run .NET applications that rely on those capabilities on Unix.

Mono 通常与实时编译器一起使用,但它也提供在 iOS 之类的平台使用的完整静态编译器(预先编译)Mono is typically used with a just-in-time compiler, but it also features a full static compiler (ahead-of-time compilation) that is used on platforms like iOS.

请参阅 Mono 文档See the Mono documentation.

.NET.NET

.NET Standard 和所有 .NET 实现及工作负荷的涵盖性术语。The umbrella term for .NET Standard and all .NET implementations and workloads. 始终采用全大写形式,请勿使用“.Net”。Always fully capitalized, never ".Net".

.NET5(当前处于预览状态)发布时,它将是所有新 .NET 开发的建议 .NET 实现,因此在某些上下文中,“.NET”将表示“.NET 5 及更高版本”。When .NET 5 (currently in preview) is released, it will be the recommended .NET implementation for all new .NET development, and so in some contexts ".NET" will imply ".NET 5 and later versions."

请参阅 .NET 基础知识See .NET fundamentals

.NET 5 及更高版本.NET 5 and later versions

一种跨平台、高性能的开放源 .NET 实现。A cross-platform, high-performance, open-source implementation of .NET. 包括公共语言运行时 (CLR)、AOT 运行时(正在开发中的 CoreRT)、基类库 (BCL) 以及 .NET SDKIncludes a Common Language Runtime (CLR), an AOT runtime (CoreRT, in development), a Base Class Library (BCL), and the .NET SDK.

此 .NET 实现的早期版本称为 .NET Core。Earlier versions of this .NET implementation are known as .NET Core. .Net 5.0 是继 .NET Core 3.1 之后的下一版本。.NET 5.0 is the next version following .NET Core 3.1. 跳过了版本 4,以避免将此较新的 .NET 实现与称为 .NET Framework 的旧实现混淆。Version 4 was skipped to avoid confusing this newer implementation of .NET with the older implementation that is known as .NET Framework. .NET Core 的当前版本为版本 4.8。The current version of .NET Framework is 4.8.

请参阅 .NET 基础知识See .NET fundamentals.

.NET CLI.NET CLI

用于开发适用于 .NET 5(和 .NET Core)及更高版本的应用程序和库的跨平台工具链。A cross-platform toolchain for developing applications and libraries for .NET 5 (and .NET Core) and later versions. 也称为 .NET Core CLI。Also known as the .NET Core CLI.

请参阅 .NET CLISee .NET CLI.

.NET Core.NET Core

请参阅 .NET 5 及更高版本See .NET 5 and later versions.

.NET Framework.NET Framework

仅在 Windows 上运行的 .NET 实现。An implementation of .NET that runs only on Windows. 包括公共语言运行时 (CLR)、基类库 (BCL) 以及应用程序框架库(例如 ASP.NET、Windows 窗体和 WPF)。Includes the Common Language Runtime (CLR), the Base Class Library (BCL), and application framework libraries such as ASP.NET, Windows Forms, and WPF.

请查阅 .NET Framework 指南See .NET Framework Guide.

.NET Native.NET Native

编译器工具链,可预先 (AOT) 生成,而非实时 (JIT) 生成本机代码。A compiler tool chain that produces native code ahead-of-time (AOT), as opposed to just-in-time (JIT).

编译采用与 C++ 编译器和链接器类似的工作方式在开发人员计算机上进行。Compilation happens on the developer's machine similar to the way a C++ compiler and linker works. 它删除了未使用的代码,留出更多时间进行优化。It removes unused code and spends more time optimizing it. 它从库中提取代码,将它们合并到可执行文件中。It extracts code from libraries and merges them into the executable. 结果是表示整个应用的单个模块。The result is a single module that represents the entire app.

UWP 是 .NET Native 支持的首个应用程序框架。UWP was the first application framework supported by .NET Native. 现在,我们支持为 Windows、macOS 和 Linux 生成本机控制台应用。Now, we support building native console apps for Windows, macOS, and Linux.

请参阅 .NET Native 和 CoreRT 简介See Intro to .NET Native and CoreRT

.NET SDK.NET SDK

一组库和工具,开发人员可用其创建适用于 .NET 5(和 .NET Core)及更高版本的 .NET Core 应用程序和库。A set of libraries and tools that allow developers to create .NET applications and libraries for .NET 5 (and .NET Core) and later versions. 也称为 .NET Core SDK。Also known as the .NET Core SDK.

包括用于生成应用的 .NET CLI、用于生成和运行应用的 .NET 库以及用于运行 CLI 命令和运行应用程序的 dotnet 可执行文件 (dotnet.exe)。Includes the .NET CLI for building apps, .NET libraries and runtime for building and running apps, and the dotnet executable (dotnet.exe) that runs CLI commands and runs applications.

请参阅 .NET SDK 概述See .NET SDK Overview.

.NET Standard.NET Standard

在每个 .NET 实现中都可用的 .NET API 正式规范。A formal specification of .NET APIs that are available in each .NET implementation.

.NET Standard 规范有时被称为文档中的库。The .NET Standard specification is sometimes called a library in the documentation. 由于库不仅包括规范(接口),还包括 API 实现,所以会误将 .NET Standard 称为“库”。Because a library includes API implementations, not only specifications (interfaces), it's misleading to call .NET Standard a "library."

请参阅 .NET StandardSee .NET Standard.

NGENNGEN

本机(映像)生成。Native (image) generation.

可将此方法视为永久性 JIT 编译器。You can think of this technology as a persistent JIT compiler. 它通常在执行代码的计算机上编译该代码,但通常在安装时进行编译。It usually compiles code on the machine where the code is executed, but compilation typically occurs at install time.

package

NuGet 包 — 或只是一个包 — 是一个 .zip 文件,其中具有一个或多个名称相同的程序集以及作者姓名等其他元数据。A NuGet package — or just a package — is a .zip file with one or more assemblies of the same name along with additional metadata such as the author name.

.zip 文件的扩展名为 .nupkg,且可以包含在多个目标框架和版本中使用的资产(如 .dll 文件和 .xml 文件)。The .zip file has a .nupkg extension and may contain assets, such as .dll files and .xml files, for use with multiple target frameworks and versions. 在应用或库中安装时,会根据应用或库指定的目标框架选择相应的资产。When installed in an app or library, the appropriate assets are selected based on the target framework specified by the app or library. 定义接口的资产位于 ref 文件夹,而定义实现的资产位于 lib文件夹。The assets that define the interface are in the ref folder, and the assets that define the implementation are in the lib folder.

平台platform

操作系统以及运行它的硬件,例如 Windows、macOS、Linux、iOS 和 Android。An operating system and the hardware it runs on, such as Windows, macOS, Linux, iOS, and Android.

下面是在句子中使用的示例:Here are examples of usage in sentences:

  • “.NET Core 是一个跨平台 .NET 实现。”".NET Core is a cross-platform implementation of .NET."
  • “PCL 配置文件代表 Microsoft 平台,而 .NET Standard 与平台无关。”"PCL profiles represent Microsoft platforms, while .NET Standard is agnostic to platform."

旧的 .NET 文档有时使用“.NET 平台”来表示一个 .NET 的实现或包括所有实现的 .NET 堆栈Legacy .NET documentation sometimes uses ".NET platform" to mean either an implementation of .NET or the .NET stack including all implementations. 这两种用法往往会与主(OS/硬件)含义混淆,因此我们要尽量避免这些用法。Both of these usages tend to get confused with the primary (OS/hardware) meaning, so we try to avoid these usages.

“平台”在短语“开发人员平台”中有不同的含义,这里指的是提供用于生成和运行应用的工具和库的软件。"Platform" has a different meaning in the phrase "developer platform," which refers to software that provides tools and libraries for building and running apps. .NET 是跨平台的开放源代码开发人员平台,用于构建多种不同类型的应用程序。.NET is a cross-platform, open source developer platform for building many different types of applications.

Runtime — 运行时runtime

通常是指用于托管程序的执行环境。In general, the execution environment for a managed program. 操作系统属于运行时环境,但不属于 .NET 运行时。The OS is part of the runtime environment but is not part of the .NET runtime. 下面是此情况下 .NET 运行时的一些示例:Here are some examples of .NET runtimes in this sense of the word:

  • 公共语言运行时 (CLR)Common Language Runtime (CLR)
  • .NET Native(适用于 UWP).NET Native (for UWP)
  • Mono 运行时Mono runtime

“运行时”一词在某些上下文中有不同的含义:The word "runtime" has a different meaning in some contexts:

  • .NET 5.0 下载页上的 .NET 运行时。.NET runtime on the .NET 5.0 download page.

    可下载 .NET 运行时或其他运行时,如 ASP.NET Core 运行时 。You can download the .NET runtime or other runtimes, such as the ASP.NET Core runtime. 在此用法中运行时是一组必须安装在计算机上的组件,这样才能在计算机上运行依赖于框架的应用。A runtime in this usage is the set of components that must be installed on a machine to run a framework-dependent app on the machine. .NET 运行时包括 CLR 和 .NET 共享框架,后者提供 BCLThe .NET runtime includes the CLR and the .NET shared framework, which provides the BCL.

  • .NET 运行时库.NET runtime libraries

    BCL 引用的相同的库。Refers to the same libraries that BCL refers to. 但是,其他运行时(例如 ASP.NET Core 运行时)具有不同的共享框架,并具有在 BCL 上构建的其他库。However, other runtimes, such as the ASP.NET Core runtime, have different shared frameworks, with additional libraries that build on the BCL.

  • 运行时标识符 (RID)Runtime Identifier (RID).

    此处的“运行时”表示运行 .NET 应用的 OS 平台和 CPU 体系结构,例如:linux-x64Runtime here means the OS platform and CPU architecture that a .NET app runs on, for example: linux-x64.

  • 有时在 .NET 实现的意义上使用“运行时”,如以下示例中所示:Sometimes "runtime" is used in the sense of an implementation of .NET, as in the following examples:

    • “各种 .NET 运行时实现特定版本的 .NET Standard。"The various .NET runtimes implement specific versions of .NET Standard. 每个 .NET 运行时版本都将会公布它所支持的最高 .NET Standard 版本...”Each .NET runtime version advertises the highest .NET Standard version it supports …"
    • “计划在多个运行时上运行的库应将此框架作为目标。”"Libraries that are intended to run on multiple runtimes should target this framework." (参阅 .NET Standard)(referring to .NET Standard)

共享框架shared framework

含义取决于上下文。Meaning depends on context. .NET 共享框架指 .NET 运行时中包含的库。The .NET shared framework refers to the libraries included in the .NET runtime. 在这种情况下,适用于 .NET 5(和 .NET Core)及更高版本的共享框架指 BCL 引用的相同的库。In this case, the shared framework for .NET 5 (and .NET Core) and later versions refers to the same libraries that BCL refers to.

也存在其他共享框架。There are other shared frameworks. ASP.NET Core 共享框架指 ASP.NET Core 运行时中包含的库,其中包括 BCL 以及供 Web 应用使用的其他 API。The ASP.NET Core shared framework refers to the libraries included in the ASP.NET Core runtime, which includes the BCL plus additional APIs for use by web apps.

对于依赖于框架的应用,共享框架由库组成,这些库包含在运行应用的计算机上的文件夹中的程序集内。For framework-dependent apps, the shared framework consists of libraries that are contained in assemblies installed in a folder on the machine that runs the app. 对于自包含应用,共享框架程序集包含在该应用中。For self-contained apps, the shared framework assemblies are included with the app.

有关详细信息,请参阅深入了解 .NET Core 基元,第 2 部分:共享框架For more information, see Deep-dive into .NET Core primitives, part 2: the shared framework.

堆栈stack

一组编程方法,一起用于生成并运行应用程序。A set of programming technologies that are used together to build and run applications.

“.NET 堆栈”指 .NET Standard 和所有 .NET 实现。"The .NET stack" refers to .NET Standard and all .NET implementations. 短语“一个 .NET 堆栈”可能指一种 .NET 实现。The phrase "a .NET stack" may refer to one implementation of .NET.

Target Framework — 目标 Frameworktarget framework

.NET 应用或库依赖的 API 集合。The collection of APIs that a .NET app or library relies on.

应用或库可将某版本的 .NET Standard(例如 .NET Standard 2.0)作为目标,这是所有 .NET 实现中一组标准化 API 的规范。An app or library can target a version of .NET Standard (for example, .NET Standard 2.0), which is a specification for a standardized set of APIs across all .NET implementations. 应用或库还能以特定 .NET 的某版本实现为目标,这样便可获得特定于实现的 API 的访问权限。An app or library can also target a version of a specific .NET implementation, in which case it gets access to implementation-specific APIs. 例如,面向 Xamarin.iOS 的应用有权访问 Xamarin 提供的 iOS API 包装器。For example, an app that targets Xamarin.iOS gets access to Xamarin-provided iOS API wrappers.

对于某些目标框架(例如 .NET Framework),可用 API 由 .NET 实现在系统上安装的程序集定义,其中可能包括应用程序框架 API(例如 ASP.NET、WinForms)。For some target frameworks (for example, the .NET Framework) the available APIs are defined by the assemblies that a .NET implementation installs on a system, which may include application framework APIs (for example, ASP.NET, WinForms). 对于基于包的目标框架(例如 .NET Standard 和 .NET Core),框架 API 由安装在应用或库中的包定义。For package-based target frameworks (such as .NET Standard and .NET Core), the framework APIs are defined by the packages installed in the app or library. 在这种情况下,目标框架隐式指定一个包,该包引用一起构成框架的所有包。In that case, the target framework implicitly specifies a package that references all the packages that together make up the framework.

请参阅目标框架See Target Frameworks.

TFMTFM

目标框架名字对象。Target framework moniker.

一个标准化令牌格式,用于指定 .NET 应用或库的目标框架。A standardized token format for specifying the target framework of a .NET app or library. 目标框架通常由短名称(如 net462)引用。Target frameworks are typically referenced by a short name, such as net462. 存在长格式的 TFM(如 .NETFramework,Version=4.6.2),但通常不用来指定目标框架。Long-form TFMs (such as .NETFramework,Version=4.6.2) exist but are not generally used to specify a target framework.

请参阅目标框架See Target Frameworks.

UWPUWP

通用 Windows 平台。Universal Windows Platform.

用于为物联网 (IoT) 生成新式触控 Windows 应用程序和软件的 .NET 实现。An implementation of .NET that is used for building modern, touch-enabled Windows applications and software for the Internet of Things (IoT). 它旨在统一可能想要以其为目标的不同类型的设备,包括电脑、平板电脑、电话,甚至 Xbox。It's designed to unify the different types of devices that you may want to target, including PCs, tablets, phones, and even the Xbox. UWP 提供许多服务,如集中式应用商店、执行环境 (AppContainer) 和一组 Windows API(用于代替 Win32 (WinRT))。UWP provides many services, such as a centralized app store, an execution environment (AppContainer), and a set of Windows APIs to use instead of Win32 (WinRT). 应用可采用 C++、C#、Visual Basic 和 JavaScript 编写。Apps can be written in C++, C#, Visual Basic, and JavaScript. 使用 C# 和 Visual Basic 时,.NET API 由 .NET 5(和 .NET Core)及更高版本提供。When using C# and Visual Basic, the .NET APIs are provided by .NET 5 (and .NET Core) and later versions.

workloadworkload

某人正在构建的一种类型的应用。A type of app someone is building. 应用模型更通用。More generic than app model. 例如,在每个 .NET 文档页(包括此页)的顶部都有一个“工作负载”下拉列表,你可以通过该列表切换到针对“Web”、“移动”、“云”、“桌面”和“机器学习 & 数据”的文档 。For example, at the top of every .NET documentation page, including this one, is a drop-down list for Workloads, which lets you switch to documentation for Web, Mobile, Cloud, Desktop, and Machine Learning & Data.

在某些上下文中,工作负载是指 Visual Studio 功能的集合,可以选择安装这些功能以支持特定类型的应用。In some contexts, workload refers to a collection of Visual Studio features that you can choose to install to support a particular type of app. 有关示例,请参阅选择工作负载For an example, see Select a workload.

请参阅See also