473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

dynamically determine .net baseframework version of exe or dll

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
3 1573
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: George Hester | last post by:
Say I have this in a web page: <center><a href="http://www.microsoft.com">www.microsoft.com</a></center> I can use CSS, the DOM and\or JavaScript to determine the width style.innerHTML.length...
1
by: Andy | last post by:
Can anyone tell me if it is possible to dynamically create generic collections? simply put I want to be able to something like this : public object test(SomeBaseClass param1) { if...
4
by: david | last post by:
I have an array of CheckBoxes which dynamically display in a web form. How to detect and determine which CheckBox' check status changed? For example, Array(i, j) from checked to Unchecked and...
6
by: Samuel R. Neff | last post by:
How can you detect the version of windows common controls installed at run-time? I want to implement the ListViewXP (flicker-free) but still need to support non-XP computers (which will have...
3
by: Anthony LaMark | last post by:
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...
8
by: BillE | last post by:
When I create a control dynamically and it grows according to the content, the control Height property still returns the original default control height instead of the height after expanding. ...
2
by: Nathan Sokalski | last post by:
I have LinkButtons that are dynamically created in one of the PostBack events. They must be created in the PostBack event because one of the variables required to determine which ones to create...
9
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post by:
"parez" wrote: Assembly.LoadWithPartialName does indeed work!! Now, why is this incredibly useful routine deprecated and we are instructed to use Assembly.Load instead which does not provide...
4
by: ameshkin | last post by:
Hi Everybody, I'm just now learning javascript and I'm using mootools. What I want to do is to dynamically load a php page into accordian panel 2, depending on which radio button is selected in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.