Detect .net Framework version running

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an app that was built with .net 1.1.

It loads but does not work with 2.0.

On starting the application I want to add a check to see the version of
framework that is running and if it is 2.0 add an error. how do I do this?
 
On starting the application I want to add a check to see the version of
framework that is running and if it is 2.0 add an error. how do I do this?

Check System.Environment.Version


Mattias
 
Assuming you can load your app enough to get it started, Environment.Version
will return a Version telling what runtime you're running under.
 
Back
Top