# .NET

**.NET** 是微软推出的跨平台、开源开发者平台，用于构建 Web、移动、桌面、云和游戏应用。其执行模型由 ECMA-335 标准化，该标准定义了通用语言基础结构（CLI）——在这一规范下，用多种高级语言编写的应用无需针对每种环境的特点重写，即可在不同系统环境中运行<sup>[1](https://www.ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf)</sup>。该平台以 MIT 许可证在 GitHub 上发布<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>。

| 关键事实 | 详情 |
|---|---|
| 发布节奏 | 大版本每年 11 月发布；偶数版本（.NET 8、.NET 10）为长期支持（LTS），奇数版本（.NET 9、.NET 11）为标准期限支持（STS）<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup> |
| 支持时长 | LTS 版本至少支持 3 年；STS 版本至少支持 24 个月，或其后继版本发布后 12 个月<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup> |
| 当前 LTS | .NET 10，2025 年 11 月 11 日发布，2028 年 11 月 14 日终止支持<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup> |
| 许可证 | MIT 许可证，源码托管于 GitHub<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup> |
| 生态规模 | NuGet 上超过 478,000 个包，下载量超过 8000 亿次<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup> |
| 采用情况 | ASP.NET Core 被纳入 Stack Overflow 开发者调查<sup>[5](https://survey.stackoverflow.co/2024/technology)</sup> |
| 执行模型 | 源代码通常编译为通用中间语言（CIL），再由实时编译器在运行时转换为本机代码<sup>[6](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)</sup> |

## .NET 是什么

CLR 提供核心系统服务，包括类加载、编译、异常处理、垃圾回收和安全<sup>[7](https://news.microsoft.com/speeches/speech-transcript-anders-hejlsberg-visual-studio-net-launch/)</sup>。在其上运行的托管代码可获得垃圾回收、安全、与非托管代码的互操作、跨语言调试支持，以及增强的部署和版本控制支持<sup>[6](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)</sup>。

为支持多种源语言一起构建和运行，CLR 提供了通用类型系统、中间语言和动态执行环境。<sup>[8](https://dl.acm.org/doi/10.1145/378795.378797)</sup> 在最初发布时，微软随平台提供了四种语言：[Visual Basic](https://www.edgepedia.org/zh/visual-basic)、C++、C# 和 J#，业界合作伙伴在运行时上支持超过 20 种语言<sup>[7](https://news.microsoft.com/speeches/speech-transcript-anders-hejlsberg-visual-studio-net-launch/)</sup>。如今微软的主力语言是 C# 和 F#：C# 14 和 F# 10 随 .NET 10 一同发布，C# 在 2025 年 GitHub Octoverse 报告中位列前 5 大语言<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

## 历史与统一

.NET 生态于 2002 年随面向 Windows 应用的 .NET Framework 问世<sup>[9](https://dl.acm.org/doi/fullHtml/10.1145/3658271.3658314)</sup>。.NET Core 的诞生是为了让 .NET 能够开源、跨平台，并适用于资源更受限的环境<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>。微软于 2014 年 4 月在北美 TechEd 大会上首次公布 .NET Core 5，将其定位为 .NET 的“云优化”版本，后来更名为“.NET Core”<sup>[10](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)</sup>。在 2014 年 11 月的 Connect(); 大会上，微软以 MIT 许可证将 .NET Core 5 作为完全开源的堆栈交付，支持 Windows、Linux 和 Mac，并贡献给 .NET 基金会<sup>[10](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)</sup>。微软此前已将 C#、VB 和 F# 的托管编译器以及 ASP.NET 开源，随后宣布 .NET Core 本身也将开源，包括运行时和框架库<sup>[11](https://devblogs.microsoft.com/dotnet/net-core-is-open-source/)</sup>。

**一个运行时，两条血脉。** .NET Core 与 .NET Framework 共享垃圾回收器、JIT 以及 [String](https://www.edgepedia.org/zh/string)、List 等类型，二者是子集-超集关系<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>。.NET Core 运行时与 .NET Framework CLR 基于同一代码库构建，包含相同的 GC 和 JIT（RyuJIT），但省略了应用程序域和代码访问安全，并通过 NuGet 交付<sup>[10](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)</sup>。现代 .NET 5+ 系列延续自 .NET Core；.NET 5.0 于 2022 年 5 月 10 日终止支持，.NET Core 3.1 于 2022 年 12 月 13 日终止支持<sup>[12](https://dotnet.microsoft.com/en-us/download/dotnet)</sup>。

.NET Framework 系列仍绑定于 Windows：.NET Framework 4.8 将继续随未来的 Windows 版本分发，只要底层 Windows 版本受支持，它便受支持<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup>。4.6.2 之前的版本已终止支持<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>。

## 运行时如何工作

面向 CLR 的编译器通常将源代码转换为通用中间语言（CIL）——一种与 CPU 无关的指令集，通常在应用运行时由实时（JIT）编译器转换为本机代码<sup>[6](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)</sup>。CLR 为每种支持的 CPU 架构提供 JIT 编译器，因此相同的 CIL 程序集可在不同的机器架构上运行<sup>[6](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)</sup>。

**按需编译。** 运行时不一次性转换可执行文件中的所有 CIL，而是在执行过程中按需编译方法，并将生成的本机代码存储在内存中<sup>[6](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)</sup>。JIT 编译器为 RyuJIT，它从 .NET Framework 上的 x86 jit32 JIT 演化而来，并被移植到 .NET Core 支持的所有架构和平台目标；它为运行时提供实时编译和提前编译两种服务<sup>[13](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/ryujit-overview.md)</sup>。

**分层编译。** 分层编译让运行时在应用生命周期内为同一方法替换不同的编译实现，以获得更高性能<sup>[14](https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md)</sup>。Tier0 是能最快提供出来供方法首次运行的代码，以最小优化生成以利于启动；一旦某方法变热，质量更高的 Tier1 代码便会取代它<sup>[14](https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md)</sup>。对于在 ReadyToRun 映像中预编译的方法，预编译代码充当 Tier0 版本，运行时可以用 JIT 代码替换热的 ReadyToRun 代码，从而利用实际加载的依赖项和 CPU 指令支持<sup>[14](https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md)</sup>。其既定目标是改善典型 .NET Core 工作负载的稳态性能和启动性能，同时尽量减少性能回退<sup>[14](https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md)</sup>。

**泛型。** 在支持参数化多态时，CLR 利用了运行时的动态特性：它即时特化类型，基于表示共享代码，并采用新颖的方法高效地创建和使用运行时类型。<sup>[8](https://dl.acm.org/doi/10.1145/378795.378797)</sup> CIL 的提前编译也有研究渊源：[微软研究院](https://www.edgepedia.org/zh/microsoft-research)的 Bartok 编译器将 CIL 提前编译为 x86 代码，其大部分运行时和基类库用 C# 本身编写<sup>[15](https://www.microsoft.com/en-us/research/wp-content/uploads/2010/03/techreport2.pdf)</sup>。

## 工作负载与框架

**ASP.NET Core** 和 **Entity Framework Core** 作为 .NET 版本的一部分发布，并遵循父版本的生命周期<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>。

.NET MAUI（多平台应用 UI）让开发者用 C# 和 XAML 从单一代码库为 iOS、Android、macOS 和 Windows 创建现代的原生编译应用。<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup> MAUI 曾被定为 .NET 7 的主要组成部分，更早之前已有有限版本可用——此时距平台发布已二十年<sup>[16](https://www.techrepublic.com/article/20-years-of-net-microsofts-scott-hunter/)</sup>。在 .NET 9 发布前的一年里，MAUI 开发者使用量增长超过 30%，创下历史新高<sup>[17](https://devblogs.microsoft.com/dotnet/announcing-dotnet-9/)</sup>。

**.NET Aspire** 面向云原生开发：Aspire 13 随 .NET 10 发布，在多语言开发、现代工作流和企业部署方面有重大改进<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

## 数据一览

截至 .NET 10 发布时的版本与支持情况：

| 版本 | 发布日期 | 类型 | 终止支持 |
|---|---|---|---|
| .NET 10 | 2025 年 11 月 11 日 | LTS | 2028 年 11 月 14 日<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup> |
| .NET 9 | 2024 年 11 月 12 日 | STS | 2026 年 11 月 10 日<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup> |
| .NET 8 | 2023 年 11 月 14 日 | LTS | 2026 年 11 月 10 日<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup> |
| .NET 7 |  | STS | 2024 年 5 月 14 日<sup>[12](https://dotnet.microsoft.com/en-us/download/dotnet)</sup> |
| .NET 6 |  | LTS | 2024 年 11 月 12 日<sup>[12](https://dotnet.microsoft.com/en-us/download/dotnet)</sup> |

随着 STS 支持从 18 个月延长至 24 个月，.NET 9 和 .NET 8 均于 2026 年 11 月 10 日终止支持<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

采用数据使 .NET 跻身使用最广泛的服务器端生态之列。在 2026 年 Stack Overflow 开发者调查中，[ASP.NET Core](https://www.edgepedia.org/zh/asp-net-core) 的使用率为 19.9%，ASP.NET（Framework）为 13.9%，而 Node.js 为 46.4%，React 为 41.5%<sup>[18](https://survey.stackoverflow.co/2026/technology/data/web-framework-timeseries)</sup>。在 ASP.NET Core 首次被单独统计的时间序列中，其使用率从 2024 年的 3.0% 升至 2025 年的 4.5%，再到 2026 年的 6.2%，而 ASP.NET 在这三年中分别为 12.9%、14.2% 和 13.9%<sup>[18](https://survey.stackoverflow.co/2026/technology/data/web-framework-timeseries)</sup>。

## 性能与对比

微软称 .NET 9 是其迄今性能最强的版本，在运行时、工作负载和语言方面有超过 1,000 项性能相关改动；通过采用与 Native AOT 相同的异常模型，异常处理速度提升了 50%<sup>[17](https://devblogs.microsoft.com/dotnet/announcing-dotnet-9/)</sup>。

在一项以后端框架为对象的同行评审比较研究中，.NET 的响应时间最佳，Node.js 和 [Django REST Framework](https://www.edgepedia.org/zh/django-rest-framework) 紧随其后，但这一提升伴随着更高的系统资源消耗<sup>[9](https://dl.acm.org/doi/fullHtml/10.1145/3658271.3658314)</sup>。

据开发者分析引用的 TechEmpower 第 23 轮（2025 年 2 月）原始吞吐量数据，.NET 9 上的 ASP.NET Core 在纯文本基准测试中达到每秒 27,530,836 次请求，而 Fastify（Node.js）为 1,175,038 次，Express 为 279,922 次，原始吞吐量差距达 23.4 倍<sup>[19](https://dev.to/insight105/on-web-framework-performance-a-net-10-reality-check-4ep5)</sup>。在包含实际工作的 JSON 工作负载上，差距缩小至约 3.0 倍：ASP.NET Core 为每秒 2,546,481 次请求，Fastify 为 844,960 次<sup>[19](https://dev.to/insight105/on-web-framework-performance-a-net-10-reality-check-4ep5)</sup>。

## 近期发展

自 2023 年 11 月 .NET 8 以来，已发布两个版本。.NET 9（2024 年 11 月 12 日）带来了上述 1,000 多项性能改动和更快的异常模型<sup>[17](https://devblogs.microsoft.com/dotnet/announcing-dotnet-9/)</sup>。.NET 10（2025 年 11 月 11 日）是支持三年的 LTS 版本<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

**硬件加速。** .NET 10 新增对最新英特尔芯片的 AVX10.2 支持，以及面向高级向量化的 Arm64 SVE，Arm64 写屏障改进将 GC 暂停时间减少 8% 至 20%<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

**支持政策。** STS 支持从 18 个月延长至 24 个月，这一变化延长了 .NET 9 等奇数版本的使用寿命<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

**语言与工具。** C# 14 和 F# 10 随 .NET 10 发布，Aspire 13 同步到来<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

## 许可、支持与治理

.NET 以 MIT 许可证在 GitHub 上提供<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>，微软在 Windows、Linux 和 Mac 上支持 .NET Core<sup>[10](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)</sup>。作为开源转型的一部分，微软将 .NET Core 贡献给 .NET 基金会<sup>[10](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)</sup>。

两条产品线采用不同的支持模式。现代 .NET 遵循每年 11 月的发布节奏，并区分 LTS 和 STS<sup>[2](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)</sup>；而 .NET Framework 4.8 作为 Windows 组件受支持，而非作为独立版本化的产品<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup>。

有一个日期在微软自己的来源中说法不一：支持政策页面列出 .NET 10 的终止支持日期为 2028 年 11 月 14 日<sup>[3](https://dotnet.microsoft.com/en-us/platform/support/policy)</sup>，而 .NET 10 发布公告称支持三年，至 2028 年 11 月 10 日<sup>[4](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)</sup>。

## References

1. [ECMA-335, 6th edition, June 2012 (Common Language Infrastructure standard), Ecma International](https://www.ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf)
2. [Lifecycle FAQ - .NET and .NET Core, Microsoft Learn](https://learn.microsoft.com/en-us/lifecycle/faq/dotnet-core)
3. [The official .NET support policy, .NET](https://dotnet.microsoft.com/en-us/platform/support/policy)
4. [Announcing .NET 10, .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-dotnet-10/)
5. [Technology, 2024 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2024/technology)
6. [Managed Execution Process, Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/standard/managed-execution-process)
7. [Speech Transcript - Anders Hejlsberg, Visual Studio .NET Launch, Microsoft](https://news.microsoft.com/speeches/speech-transcript-anders-hejlsberg-visual-studio-net-launch/)
8. [Design and implementation of generics for the .NET Common Language Runtime, ACM](https://dl.acm.org/doi/10.1145/378795.378797)
9. [Performance Evaluation of Back-End Frameworks: A Comparative Study, ACM](https://dl.acm.org/doi/fullHtml/10.1145/3658271.3658314)
10. [Announcing .NET 2015 Preview: A New Era for .NET, .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-net-2015-preview-a-new-era-for-net/)
11. [.NET Core is Open Source, .NET Blog](https://devblogs.microsoft.com/dotnet/net-core-is-open-source/)
12. [Browse all .NET versions to download, .NET](https://dotnet.microsoft.com/en-us/download/dotnet)
13. [RyuJIT overview, dotnet/runtime design documentation, GitHub](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/jit/ryujit-overview.md)
14. [Tiered Compilation design document, dotnet/runtime, GitHub](https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md)
15. [SPUR: A Trace-Based JIT Compiler for CIL, Microsoft Research](https://www.microsoft.com/en-us/research/wp-content/uploads/2010/03/techreport2.pdf)
16. [20 years of .NET: Microsoft's Scott Hunter, TechRepublic](https://www.techrepublic.com/article/20-years-of-net-microsofts-scott-hunter/)
17. [Announcing .NET 9, .NET Blog](https://devblogs.microsoft.com/dotnet/announcing-dotnet-9/)
18. [Web frameworks and technologies, 2026 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2026/technology/data/web-framework-timeseries)
19. [On Web Framework Performance: A .NET 10 Reality Check, dev.to](https://dev.to/insight105/on-web-framework-performance-a-net-10-reality-check-4ep5)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Development tools and collaboration infrastructure › Frameworks, libraries, and APIs › Mobile and platform frameworks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/net-ep6cje6aya

English original: https://www.edgepedia.org/net-ep6cje6aya
