检测电脑安装的net framework版本

Posted 庚武讲堂

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了检测电脑安装的net framework版本相关的知识,希望对你有一定的参考价值。

https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

To find .NET Framework versions by viewing the registry (.NET Framework 1-4)

  1. On the Start menu, choose Run.

  2. In the Open box, enter regedit.exe.

    You must have administrative credentials to run regedit.exe.

  3. In the Registry Editor, open the following subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP

    The installed versions are listed under the NDP subkey. The version number is stored in the Version entry. For the .NET Framework 4 the Versionentry is under the Client or Full subkey (under NDP), or under both subkeys.

    技术分享Note

    The "NET Framework Setup" folder in the registry does not begin with a period.

To find .NET Framework versions by viewing the registry (.NET Framework 4.5 and later)

  1. On the Start menu, choose Run.

  2. In the Open box, enter regedit.exe.

    You must have administrative credentials to run regedit.exe.

  3. In the Registry Editor, open the following subkey:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full

    Note that the path to the Full subkey includes the subkey Net Framework rather than .NET Framework.

    技术分享Note

    If the Full subkey is not present, then you do not have the .NET Framework 4.5 or later installed.

    Check for a DWORD value named Release. The existence of the Release DWORD indicates that the .NET Framework 4.5 or newer has been installed on that computer.

    技术分享

      

    The value of the Release DWORD indicates which version of the .NET Framework is installed.

    Value of the Release DWORD

    Version

    378389

    .NET Framework 4.5

    378675

    .NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2

    378758

    .NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2

    379893

    .NET Framework 4.5.2

    On Windows 10 systems: 393295

    On all other OS versions: 393297

    .NET Framework 4.6

    On Windows 10 November Update systems: 394254

    On all other OS versions: 394271

    .NET Framework 4.6.1

    On Windows 10 Anniversary Update: 394802

    On all other OS versions: 394806

    .NET Framework 4.6.2

To find .NET Framework versions by querying the registry in code (.NET Framework 1-4)

  • Use the Microsoft.Win32.RegistryKey class to access the Software\Microsoft\NET Framework Setup\NDP\ subkey under HKEY_LOCAL_MACHINE in the Windows registry.

    The following code shows an example of this query.

以上是关于检测电脑安装的net framework版本的主要内容,如果未能解决你的问题,请参考以下文章

安装NET Framework 2.0的时候他说我的电脑已经安装了

电脑net.framework低于4.0怎么解决

我家电脑WIN7系统的 安装不了net framework4 求系统方面专家教导下

如何查看本机的.net framework版本

怎么查看电脑.NET Framework版本

如何查看电脑.net framework版本