.NET Framework 版本.NET Framework version | Release 的值 Value of Release |
---|---|
.NET Framework 4.5.NET Framework 4.5 | 所有 Windows 操作系统:378389All Windows operating systems: 378389 |
.NET Framework 4.5.1.NET Framework 4.5.1 | 在 Windows 8.1 和 Windows Server 2012 R2 上:378675On Windows 8.1 and Windows Server 2012 R2: 378675 在所有其他 Windows 操作系统上:378758On all other Windows operating systems: 378758 |
.NET Framework 4.5.2.NET Framework 4.5.2 | 所有 Windows 操作系统:379893All Windows operating systems: 379893 |
.NET Framework 4.6.NET Framework 4.6 | 在 Windows 10 上:393295On Windows 10: 393295 在所有其他 Windows 操作系统上:393297On all other Windows operating systems: 393297 |
.NET Framework 4.6.1.NET Framework 4.6.1 | 在 Windows 10 11 月更新系统上:394254On Windows 10 November Update systems: 394254 在所有其他 Windows 操作系统(包括 Windows 10)上:394271On all other Windows operating systems (including Windows 10): 394271 |
.NET Framework 4.6.2.NET Framework 4.6.2 | 在 Windows 10 周年更新和 Windows Server 2016 上:394802On Windows 10 Anniversary Update and Windows Server 2016: 394802 在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:394806On all other Windows operating systems (including other Windows 10 operating systems): 394806 |
.NET Framework 4.7.NET Framework 4.7 | 在 Windows 10 创意者更新上:460798On Windows 10 Creators Update: 460798 在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:460805On all other Windows operating systems (including other Windows 10 operating systems): 460805 |
.NET Framework 4.7.1.NET Framework 4.7.1 | 在 Windows 10 Fall Creators Update 和 Windows Server 版本 1709 上:461308On Windows 10 Fall Creators Update and Windows Server, version 1709: 461308 在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:461310On all other Windows operating systems (including other Windows 10 operating systems): 461310 |
.NET Framework 4.7.2.NET Framework 4.7.2 | 在 Windows 10 2018 年 4 月更新和 Windows Server 版本 1803 上:461808On Windows 10 April 2018 Update and Windows Server, version 1803: 461808 在除 Windows 10 2018 年 4 月更新和 Windows Server 版本 1803 之外的所有 Windows 操作系统上:461814On all Windows operating systems other than Windows 10 April 2018 Update and Windows Server, version 1803: 461814 |
.NET Framework 4.8.NET Framework 4.8 | 在 Windows 10 2019 年 5 月更新和 Windows 10 2019 年 11 月更新上:528040On Windows 10 May 2019 Update and Windows 10 November 2019 Update: 528040 在 Windows 10 和 Windows Server 版本 1909 上:528209On Windows 10 and Windows Server, version 1909: 528209 在所有其他 Windows 操作系统(包括其他 Windows 10 操作系统)上:528049On all other Windows operating systems (including other Windows 10 operating systems): 528049 |
.NET Framework 版本.NET Framework version | 最小值Minimum value |
---|---|
.NET Framework 4.5.NET Framework 4.5 | 378389378389 |
.NET Framework 4.5.1.NET Framework 4.5.1 | 378675378675 |
.NET Framework 4.5.2.NET Framework 4.5.2 | 379893379893 |
.NET Framework 4.6.NET Framework 4.6 | 393295393295 |
.NET Framework 4.6.1.NET Framework 4.6.1 | 394254394254 |
.NET Framework 4.6.2.NET Framework 4.6.2 | 394802394802 |
.NET Framework 4.7.NET Framework 4.7 | 460798460798 |
.NET Framework 4.7.1.NET Framework 4.7.1 | 461308461308 |
.NET Framework 4.7.2.NET Framework 4.7.2 | 461808461808 |
.NET Framework 4.8.NET Framework 4.8 | 528040528040 |
True
,否则返回 False
。This code returns True
if it's installed and False
otherwise.1
指示已安装此版本。For most versions, there's a Install REG_DWORD value of 1
to indicate this version is installed.在这些子项中,还有一个包含版本字符串的 Version REG_SZ 值。In these subkeys, there's also a Version REG_SZ value that contains a version string.Framework 版本Framework Version | 注册表子项Registry Subkey | “值”Value |
---|---|---|
1.01.0 | HKLMSoftwareMicrosoft.NETFrameworkPolicyv1.03705HKLMSoftwareMicrosoft.NETFrameworkPolicyv1.03705 | Install REG_SZ 等于 1 Install REG_SZ equals 1 |
1.11.1 | HKLMSoftwareMicrosoftNET Framework SetupNDPv1.1.4322HKLMSoftwareMicrosoftNET Framework SetupNDPv1.1.4322 | Install REG_DWORD 等于 1 Install REG_DWORD equals 1 |
2.02.0 | HKLMSoftwareMicrosoftNET Framework SetupNDPv2.0.50727HKLMSoftwareMicrosoftNET Framework SetupNDPv2.0.50727 | Install REG_DWORD 等于 1 Install REG_DWORD equals 1 |
3.03.0 | HKLMSoftwareMicrosoftNET Framework SetupNDPv3.0SetupHKLMSoftwareMicrosoftNET Framework SetupNDPv3.0Setup | InstallSuccess REG_DWORD 等于 1 InstallSuccess REG_DWORD equals 1 |
3.53.5 | HKLMSoftwareMicrosoftNET Framework SetupNDPv3.5HKLMSoftwareMicrosoftNET Framework SetupNDPv3.5 | Install REG_DWORD 等于 1 Install REG_DWORD equals 1 |
4.0 客户端配置文件4.0 Client Profile | HKLMSoftwareMicrosoftNET Framework SetupNDPv4ClientHKLMSoftwareMicrosoftNET Framework SetupNDPv4Client | Install REG_DWORD 等于 1 Install REG_DWORD equals 1 |
4.0 完整配置文件4.0 Full Profile | HKLMSoftwareMicrosoftNET Framework SetupNDPv4FullHKLMSoftwareMicrosoftNET Framework SetupNDPv4Full | Install REG_DWORD 等于 1 Install REG_DWORD equals 1 |
clrver
。Open the Developer Command Prompt for Visual Studio and enter clrver
.Environment
类The Environment
classSystem.Version
对象标识当前正在执行代码的运行时版本。The returned System.Version
object identifies the version of the runtime that's currently executing the code.它不返回可能已安装在计算机上的程序集版本或其他运行时版本。It doesn't return assembly versions or other versions of the runtime that may have been installed on the computer..NET Standard.NET Standard | 1.01.0 | 1.11.1 | 1.21.2 | 1.31.3 | 1.41.4 | 1.51.5 | 1.61.6 | 2.02.0 | 2.12.1 |
---|---|---|---|---|---|---|---|---|---|
.NET Core.NET Core | 1.01.0 | 1.01.0 | 1.01.0 | 1.01.0 | 1.01.0 | 1.01.0 | 1.01.0 | 2.02.0 | 3.03.0 |
.NET Framework 1.NET Framework 1 | 4.54.5 | 4.54.5 | 4.5.14.5.1 | 4.64.6 | 4.6.14.6.1 | 4.6.1 24.6.1 2 | 4.6.1 24.6.1 2 | 4.6.1 24.6.1 2 | N/A3N/A3 |
MonoMono | 4.64.6 | 4.64.6 | 4.64.6 | 4.64.6 | 4.64.6 | 4.64.6 | 4.64.6 | 5.45.4 | 6.46.4 |
Xamarin.iOSXamarin.iOS | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.1410.14 | 12.1612.16 |
Xamarin.MacXamarin.Mac | 3.03.0 | 3.03.0 | 3.03.0 | 3.03.0 | 3.03.0 | 3.03.0 | 3.03.0 | 3.83.8 | 5.165.16 |
Xamarin.AndroidXamarin.Android | 7.07.0 | 7.07.0 | 7.07.0 | 7.07.0 | 7.07.0 | 7.07.0 | 7.07.0 | 8.08.0 | 10.010.0 |
通用 Windows 平台Universal Windows Platform | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.010.0 | 10.0.1629910.0.16299 | 10.0.1629910.0.16299 | 10.0.1629910.0.16299 | 待定TBD |
UnityUnity | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 2018 年 1 月2018.1 | 待定TBD |
System.Runtime
)描述:A given component, like System.Runtime
, describes:netstandard
精简 TFM(例如 netstandard1.4
)来设定 .NET Standard 框架作为目标。You can target the .NET Standard framework using the netstandard
compact TFM (for example, netstandard1.4
).如果构建的库将在多个运行时中运行,就应将此框架作为目标。Libraries that are intended to run on multiple runtimes should target this framework.对于最广泛的 API 集,将 netstandard2.0
设定为目标,因为 .NET Standard 2.0 的可用 API 数量比 .NET Standard 1.6 的两倍还多。For the broadest set of APIs, target netstandard2.0
since the number of available APIs more than doubled between .NET Standard 1.6 and 2.0.NETStandard.Library
元包引用定义 .NET Standard 的一整套 NuGet 包。The NETStandard.Library
metapackage references the complete set of NuGet packages that define .NET Standard.要指定 netstandard
作为目标,最常见的方法是引用此元包。The most common way to target netstandard
is by referencing this metapackage.它描述并提供了对大约 40 个 .NET 库及定义 .Net Standard 的相关 API 的访问权限。It describes and provides access to the ~40 .NET libraries and associated APIs that define .NET Standard.可以引用以 netstandard
为目标的其他包来使用其他 API。You can reference additional packages that target netstandard
to get access to additional APIs.netstandard
。You can build .NET Standard Libraries using a combination of the netstandard
framework and the NETStandard.Library metapackage.可以查看使用 .NET Core 工具定位 .NET Standard 的示例。You can see examples of targeting the .NET Standard with .NET Core tools.netstandard
的基于配置文件的 PCL 更易于使用。Profile-based PCLs packaged as netstandard
are easier to consume than typically packaged profile-based PCLs.netstandard
打包符合现有用户的需要。netstandard
packaging is compatible with existing users.PCL 配置文件PCL Profile | .NET Standard.NET Standard | PCL 平台PCL Platforms |
---|---|---|
Profile7Profile7 | 1.11.1 | .NET Framework 4.5、Windows 8.NET Framework 4.5, Windows 8 |
Profile31Profile31 | 1.01.0 | Windows 8.1、Windows Phone Silverlight 8.1Windows 8.1, Windows Phone Silverlight 8.1 |
Profile32Profile32 | 1.21.2 | Windows 8.1、Windows Phone 8.1Windows 8.1, Windows Phone 8.1 |
Profile44Profile44 | 1.21.2 | .NET Framework 4.5.1、Windows 8.1.NET Framework 4.5.1, Windows 8.1 |
Profile49Profile49 | 1.01.0 | .NET Framework 4.5、Windows Phone Silverlight 8.NET Framework 4.5, Windows Phone Silverlight 8 |
Profile78Profile78 | 1.01.0 | .NET Framework 4.5、Windows 8、Windows Phone Silverlight 8.NET Framework 4.5, Windows 8, Windows Phone Silverlight 8 |
Profile84Profile84 | 1.01.0 | Windows Phone 8.1、Windows Phone Silverlight 8.1Windows Phone 8.1, Windows Phone Silverlight 8.1 |
Profile111Profile111 | 1.11.1 | .NET Framework 4.5、Windows 8、Windows Phone 8.1.NET Framework 4.5, Windows 8, Windows Phone 8.1 |
Profile151Profile151 | 1.21.2 | .NET Framework 4.5.1、Windows 8.1、Windows Phone 8.1.NET Framework 4.5.1, Windows 8.1, Windows Phone 8.1 |
Profile157Profile157 | 1.01.0 | Windows 8.1、Windows Phone 8.1、Windows Phone Silverlight 8.1Windows 8.1, Windows Phone 8.1, Windows Phone Silverlight 8.1 |
Profile259Profile259 | 1.01.0 | .NET Framework 4.5、Windows 8, Windows Phone 8.1、Windows Phone Silverlight 8.NET Framework 4.5, Windows 8, Windows Phone 8.1, Windows Phone Silverlight 8 |