Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

dynamically determine .net baseframework version of exe or dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony LaMark - 26 Nov 2006 18:45 GMT
Hi All,

Whether in a Winform application (.exe) or a .Net assembly (.dll), is there
a way to determine what version of the .net baseframework the run-time
module (i.e. exe or dll) was loaded with (is using)?  Seems that using
reflection this is possible...just can't seem to figure out what
classes/instances will get me there.  Thanks in advance!

Tony
Mattias Sjögren - 26 Nov 2006 19:25 GMT
Anthony,

>Whether in a Winform application (.exe) or a .Net assembly (.dll), is there
>a way to determine what version of the .net baseframework the run-time
>module (i.e. exe or dll) was loaded with (is using)?

System.Environment.Version

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Gabriel Lozano-Morán - 28 Nov 2006 00:18 GMT
If you are looking for a non-programmatic way you can enable CLR Load
Logging which I blogged about
http://pointerx.net/blogs/glozano/archive/2006/03/23/84.aspx

Gabriel Lozano-Morán

> Hi All,
>
[quoted text clipped - 5 lines]
>
> Tony
Duggi - 28 Nov 2006 15:49 GMT
Hi

The framework library, that includes .exes and .dlls, (eg :say
System.dll) are .net assemblies.... So you can always query the
metadata of assebmly through reflection.

hope this is helpful

Thanks
-Cnu

> Hi All,
>
[quoted text clipped - 5 lines]
>
> Tony

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.