473,499 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determine currently loaded version of System.Xml.dll and Mscorlib.dll ?

MC
Is there an easy way for a .NET application to determine the version of
Mscorlib.dll and System.Xml.dll that is is actually using?

Given that System.Xml.dll has been revised several times (within .NET 2.0),
I'm wanting to find out if my program is running in an up-to-date
environment.

Thanks.

Jun 27 '08 #1
2 1740
On Apr 24, 9:17*am, "MC" <for.address.l...@www.ai.uga.edu.slash.mc>
wrote:
Is there an easy way for a .NET application to determine the version of
Mscorlib.dll and System.Xml.dll that is is actually using?

Given that System.Xml.dll has been revised several times (within .NET 2.0),
I'm wanting to find out if my program is running in an up-to-date
environment.

Thanks.
Use Assembly.GetAssembly to get a reference to the assembly
Jun 27 '08 #2
MC
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:c6**********************************@w7g2000h sa.googlegroups.com...
On Apr 24, 9:17 am, "MC" <for.address.l...@www.ai.uga.edu.slash.mc>
wrote:
>Given that System.Xml.dll has been revised several times (within .NET
2.0),
I'm wanting to find out if my program is running in an up-to-date
environment.
Use Assembly.GetAssembly to get a reference to the assembly
Thanks, Ignacio. Worked like a charm. In detail, here's how I did it, in
case anyone else wonders:

Assembly a = Assembly.GetAssembly(typeof(Console));
Console.WriteLine("Mscorlib.dll information:");
Console.WriteLine(a.ImageRuntimeVersion);
Console.WriteLine(a.CodeBase);

/* Assembly */ a = Assembly.GetAssembly(typeof(XmlSerializer));
Console.WriteLine("System.Xml.dll information:");
Console.WriteLine(a.ImageRuntimeVersion);
Console.WriteLine(a.CodeBase);

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
585
by: aerobar2 | last post by:
When I debug my application I get "no symbols loaded" ================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'MHSFire': Loaded...
3
11620
by: Zoury | last post by:
Good day! :O) I have the following code : //*** using System; using System.Windows.Forms; <snip>
11
3402
by: Z D | last post by:
Hello, If I have a .NET assembly, how do I determine what version of the .NET framework it.... 1) was compiled against 2) is supposed to use 3) is compatible with? Is there a utility that...
2
1681
by: Leon Gorbaty [Bentley] | last post by:
Hi, We have some managed assemblies that are compiled with the /clr switch for some native code to load. These are currently compiled and linked against a pure .NET 1.0 environment. I have...
2
4714
by: Scott | last post by:
Does anyone know of a way to get the .NET Framework version that's required by a specified assembly. I have a program I've written that creates a Windows Installer setup for any application....
0
2812
by: Michael R. Pierotti | last post by:
Has anyone seen this error before when trying to make the install on a program. ------ Starting pre-build validation for project 'HafaSMPPInstall' ------ WARNING: Unable to find dependency...
5
3575
by: Lambuz | last post by:
First of all, is it possible usign .NET remoting feature inside a .NET applet loaded into a tag object inside an HTML page ? <OBJECT id="myID" height="150" width="300"...
0
1036
by: corey.hutchinson | last post by:
I'm trying to compare, what I believe are differences, between my application in debug mode and executing the exe from the bin\. Is there a way to "get", "display" the basic information displayed...
3
12034
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
7128
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
7006
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
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7385
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
5467
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4917
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...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3088
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
661
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.