Home All Groups Group Topic Archive Search About

Version Check of .NET Framework at runtime

Author
7 Apr 2006 7:35 AM
vighnesh
Hi All

Can anybody help on version check of .NET Framework at runtime.

Thankyou verymuch in advance

Regards
Vighneswar

Author
7 Apr 2006 8:07 AM
Peter Macej
There is surely better approach but this one works too. Get the version
of mscorlib or the framework version from mscorlib.dll path:

Dim asem As System.Reflection.Assembly
' get mscorlib assembly (it contains System.Object)
asem = System.Reflection.Assembly.GetAssembly(New System.Object().GetType)
MsgBox(asem.GetName.Version.ToString)
MsgBox(asem.Location)


--
Peter Macej
Helixoft - http://www.vbdocman.com
VBdocman - Automatic generator of technical documentation for VB, VB
..NET and ASP .NET code
Author
7 Apr 2006 8:24 AM
Polanski24
Hello!

System.Version runtimeVersion = System.Environment.Version;

This will get for you version of running runtime.

Cheers

http://sourceforge.net/projects/ngmp