0

I am creating applications with .NET Framework 4.5.1 and since it is the latest release most of the target computers have old versions of the framework.

I want soemthing like this

try
{
//Code to see if framework that user have is .NET Framework 4.5.1 
}

catch
{
// Code to show a window to user that offers downloading .NET Framework 4.5.1 
}

It should not necessarily be in this format but this is just to express my thought. Any affort would be appreciated. Thank you

Zgrkpnr
  • 1,191
  • 4
  • 15
  • 32
  • 1
    Here's a similar question answered. [1]: http://stackoverflow.com/questions/8519478/get-the-current-dot-net-version-of-my-application – vikramjb Apr 02 '14 at 10:00
  • @vikramjb yeah that seems like pretty much the solution. – Zgrkpnr Apr 02 '14 at 10:02
  • Yeap there you go, problem solved !! – vikramjb Apr 02 '14 at 10:04
  • @vikramjb and I figured out this is half of the solution. It gives the runtime version of my application. Now I need the target computer's version. – Zgrkpnr Apr 02 '14 at 10:11
  • The biggest mistake you made is not actually trying it. The first time a user runs your program, it will automatically prompt the user to get the .NET version it needs. Do not help. – Hans Passant Apr 02 '14 at 11:26
  • possible duplicate of [Why does my .NET 4 application know .NET 4 is not installed](http://stackoverflow.com/questions/10032233/why-does-my-net-4-application-know-net-4-is-not-installed) – Hans Passant Apr 02 '14 at 11:27

0 Answers0