.NET 发布和支持计划介绍
Intro
对于 .NET 的发布,大多数童鞋都知道现在每年发布一个版本,针对 .NET 的发布,最近有些更新,Current 版本将改为 STS 版本,所以写一篇文章介绍一下
每年 11 月都会发布新的 .NET 主要版本,使开发人员、社区和企业能够规划他们的路线图。
偶数版本是 LTS 版本,会有三年的支持,奇数版本是 Current 版本(后面会改成 STS 版本),有 18 个月的支持。
Release type
发布的类型可以分为三种:
LTS
LTS (Long Term Support)长期支持版本,从发布之后有三年的支持时间
STS(Short Term Support)
短期支持版本,现在叫做
Current
版本,后面会改成STS
短期支持版本,现在新的 proposal 的叫法是 STS (Short Term Support),和现在一样有十八个月的支持时间
Preview
预览版通常不受支持,会在最终发布之前提供公开测试。Preview 版本一般不受支持,但如果被指定了 "go-live" 的话,通常是 RC 版本,会受到微软的支持, RC 版本发布之后会支持到下个 RC 版本或者正式版本发布
Support type
支持的类型有下面几种:
完整支持(Full support)
在完整支持期间,会更新 .NET 版本以改进功能并减少安全漏洞。其中包含一些比较重要的 BUG修复或者重要的性能优化
维护支持(Maintenance)
在维护支持期间,仅更新 .NET 版本以修复安全漏洞。
维护支持期是对任何版本(STS或 LTS)的最后 6 个月支持。维护期结束后,该版本不再支持。
终止支持(End of life/End of support)
支持终止是指 Microsoft 不再提供修复、更新或在线技术帮助的日期。支持终止也可称为“服务终止”或缩写为“EOL”(End of life)。
使用不受支持的 .NET 版本可能会使您的应用程序、应用程序数据和计算环境面临风险,编译器会给出警告。强烈建议不要使用不受支持的软件。
Release json
为了方便通过程序或者脚本来自动化的检查 .NET 的 release,会有一个 release 的 json 文件来检查
https://github.com/dotnet/core/blob/main/release-notes/releases-index.json
{"releases-index": [{"channel-version": "7.0","latest-release": "7.0.0-preview.4","latest-release-date": "2022-05-10","security": false,"latest-runtime": "7.0.0-preview.4.22229.4","latest-sdk": "7.0.100-preview.4.22252.9","product": ".NET","support-phase": "preview","eol-date": null,"releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/7.0/releases.json"},{"channel-version": "6.0","latest-release": "6.0.5","latest-release-date": "2022-05-10","security": true,"latest-runtime": "6.0.5","latest-sdk": "6.0.300","product": ".NET","support-phase": "lts","eol-date": "2024-11-12","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/6.0/releases.json"},{"channel-version": "5.0","latest-release": "5.0.17","latest-release-date": "2022-05-10","security": true,"latest-runtime": "5.0.17","latest-sdk": "5.0.408","product": ".NET","support-phase": "eol","eol-date":"2022-05-10","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/5.0/releases.json"},{"channel-version": "3.1","latest-release": "3.1.25","latest-release-date": "2022-05-10","security": true,"latest-runtime": "3.1.25","latest-sdk": "3.1.419","product": ".NET Core","support-phase": "lts","eol-date": "2022-12-13","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.1/releases.json"},{"channel-version": "3.0","latest-release": "3.0.3","latest-release-date": "2020-02-18","security": false,"latest-runtime": "3.0.3","latest-sdk": "3.0.103","product": ".NET Core","support-phase": "eol","eol-date": "2020-03-03","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/3.0/releases.json"},{"channel-version": "2.1","latest-release": "2.1.30","latest-release-date": "2021-08-19","security": true,"latest-runtime": "2.1.30","latest-sdk": "2.1.818","product": ".NET Core","support-phase": "eol","eol-date": "2021-08-21","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.1/releases.json"},{"channel-version": "2.2","latest-release": "2.2.8","latest-release-date": "2019-11-19","security": true,"latest-runtime": "2.2.8","latest-sdk": "2.2.207","product": ".NET Core","support-phase": "eol","eol-date": "2019-12-23","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json"},{"channel-version": "2.0","latest-release": "2.0.9","latest-release-date":"2018-07-10","security": true,"latest-runtime": "2.0.9","latest-sdk": "2.1.202","product": ".NET Core","support-phase": "eol","eol-date": "2018-10-01","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.0/releases.json"},{"channel-version": "1.1","latest-release": "1.1.13","latest-release-date": "2019-05-14","security": true,"latest-runtime": "1.1.13","latest-sdk": "1.1.14","product": ".NET Core","support-phase": "eol","eol-date": "2019-06-27","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/1.1/releases.json"},{"channel-version": "1.0","latest-release": "1.0.16","latest-release-date": "2019-05-14","security": true,"latest-runtime": "1.0.16","latest-sdk": "1.1.14","product": ".NET Core","support-phase": "eol","eol-date": "2019-06-27","releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/1.0/releases.json"}]
}
你可以用 Github 的地址来进行检查也可以通过下面两个地址来获取,内容是一样的
https://dotnetcli.azureedge.net/dotnet/release-metadata/releases-index.json
https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json
More
一个正常版本的发布通常会有下面这几个过程:
preview
-> go-live
-> [lts
| sts
] -> maintenance
-> eol
首先会发布预览版本 Preview,正式版本之前会发布 rc
版就是 go-live
,正式版发布之后会进入正式的服务期,其中最后半年进入维护期,只包含安全更新,此前是完整支持,最后就是超出支持范围,终止支持了
这里我在官方给出的图上做了一些小的变动
对于 .NET Core 3.1 和 .NET 5 添加了两条线,第一条绿色的线是完整的支持期,紧接着的粉色的线代表着进入维护期
对于 LTS 版本的 Release 来说,有三年的支持,其中前面的两年半时间是完整支持,后面的半年是维护期,只有安全更新
对于 STS 版本的 Release 来说,有十八个月的支持,其中前面一年是完整支持,后面半年是维护期
Current 版本改名为 STS 版本,我觉得很大一方面是想说明,STS 版本和 LTS 版本的发布质量是一样的,大家不要觉得不是 LTS 版本就不稳定,BUG较多,两者只是支持的周期不同,LTS 有着更长的支持周期,发布质量是一样的。
References
https://github.com/dotnet/core/issues/7522
https://github.com/dotnet/designs/pull/265
https://github.com/dotnet/core/pull/7517
https://endoflife.date/dotnet
https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
https://github.com/dotnet/designs/blob/release-labels/accepted/2022/dotnet-release-labels.md#proposed-labels
https://github.com/dotnet/core/blob/main/release-notes/releases-index.json