reachb4
31st August 2011 13:53 UTC
Future-proofing the .NET version detection
I am looking for a way to detect the installed .NET frameworks. It seems like the provided solutions are all good up until the point a new version of the framework is released and then all bets are off. Is there any way to future proof .net version detection? As the current detection mechanism depends on registry keys. The installer will fail if a newer version of .net releases and a fresh system only have the latest .net version installed.
Thank You.
Afrow UK
31st August 2011 21:11 UTC
What does it matter if there is a newer version? If your software uses .NET 4 then you still need to detect 4, and not for example .NET 5. If 5 includes .NET 4 then the registry key will exist for it (and so detection will work). If 5 does not include .NET 4 then you still need to download and install .NET 4 otherwise your program will not run. This is how I see it anyway.
Stu
Roger_wgnr
2nd September 2011 08:56 UTC
Not really, There is no way to know how Microsoft will choos to register/identify future versions of the framework.