0

Using regedit one can easily check the current version of .NET Framework installed on Windows, by looking at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full and reading the Release value.

If your prerequisities are .Net 4.5.2, you can check that Release value is the one for 4.6, 4.6.1, 4.6.2. But it doesn't look very safe to me. What if 4.6.3 or 4.7 is released?

Is it fail safe to check that Release value is greater than the one for 4.5.2? I can't find anything from Microsoft saying that.

Francois
  • 10,730
  • 7
  • 47
  • 80
  • Just don't check it, let [.NET install an update when required](http://stackoverflow.com/a/10033128/17034). – Hans Passant Mar 19 '17 at 11:34
  • Thank you, but the app is installed by a legacy install shield script and we want the setup to set everything up before the user launches the app. – Francois Mar 19 '17 at 13:17
  • Hmm, the point of using an installer builder utility like InstallShield is that you don't have to do this yourself. Use the company's [help page](http://helpnet.installshield.com/installshield22helplib/helplibrary/NetRedistAdd.htm). – Hans Passant Mar 19 '17 at 14:53

1 Answers1

0

According to Microsoft, checking if it's above the required version is safe.

Backward compatibility means that an app that was developed for a particular version of a platform will run on later versions of that platform. The .NET Framework tries to maximize backward compatibility: Source code written for one version of the .NET Framework should compile on later versions of the .NET Framework, and binaries that run on one version of the .NET Framework should behave identically on later versions of the .NET Framework.