How do I detect what .NET Framework versions and service packs are installed?

后端 未结 13 2053
滥情空心
滥情空心 2020-11-22 01:31

A similar question was asked here, but it was specific to .NET 3.5. Specifically, I\'m looking for the following:

  1. What is the correct way to determine which .N
13条回答
  •  自闭症患者
    2020-11-22 02:19

    Enumerate the subkeys of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP. Each subkey is a .NET version. It should have Install=1 value if it's present on the machine, an SP value that shows the service pack and an MSI=1 value if it was installed using an MSI. (.NET 2.0 on Windows Vista doesn't have the last one for example, as it is part of the OS.)

提交回复
热议问题