![]() |
| | #1 |
| Registered User Join Date: May 2009 Location: Arizona
Posts: 35
| Get .net framework version With removing imports to 3.5 only namespaces and changing the compiler target framework to 2.0 plus changing .count to .length where appropriate in my code I can make my app work fully on 2.0 without any problems. Problem is, with MS supporting installation of .net 3.5 in Windows XP I'd like to keep my application's target framework at 3.5 so I can take advantage of newer features. Because of the problems users get running my app when they've got older versions of .net installed I would like to create an if condition in the app's load event to retrieve the .net version if possible for the end user's system. If its lower than 3.5, I'll have the app promptly let the user know of potential problems. So... Code: if (.netversion < 3.5) {
MessageBox.Show("Update please!");
}
EDIT: Apologies, its a lot easier than I thought: Code: if (System.Enviornment.Version < 3.5) {
MessageBox.Show("Update please!");
}
Last edited by kairozamorro; 05-18-2009 at 03:59 PM. Reason: Corrected errors in code |
| kairozamorro is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| code for calling the .NET framework version | Nyoud33 | C# Programming | 1 | 01-12-2009 06:53 AM |
| migrate from .Net 2.0 to .Net 3.0 | George2 | C# Programming | 3 | 07-25-2007 04:07 AM |
| changing the version of .net used in visual c# 2005 | Rune Hunter | C# Programming | 2 | 02-28-2005 06:55 PM |
| Problem building Quake source | Silvercord | Game Programming | 14 | 01-25-2003 10:01 PM |
| Visual J# | mfc2themax | A Brief History of Cprogramming.com | 0 | 10-08-2001 02:41 PM |