By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,364 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,364 IT Pros & Developers. It's quick & easy.

dynamically determine .net baseframework version of exe or dll

P: n/a
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
Nov 26 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

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

P: n/a
If you are looking for a non-programmatic way you can enable CLR Load
Logging which I blogged about
http://pointerx.net/blogs/glozano/ar.../03/23/84.aspx

Gabriel Lozano-Morán

"Anthony LaMark" <an*****@eXcSoftware.comwrote in message
news:Oi*************@TK2MSFTNGP03.phx.gbl...
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

Nov 28 '06 #3

P: n/a
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
Anthony LaMark wrote:
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
Nov 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.