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

Home Posts Topics Members FAQ

How to check an assembly's version?

Tee
Hi,

How can we check an assembly's version that is created in .NET?

I have tried to load the assembly using
System.Reflection.Assembly.LoadFile and

GetCustomAttributes - AssemblyFileVersionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVersionAttribute.

Can anyone help?

Thanks,

Tee
Jul 21 '05 #1
3 1789
Try Assembly.GetName().Version.
"Tee" <th*@streamyx.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
Hi,

How can we check an assembly's version that is created in .NET?

I have tried to load the assembly using
System.Reflection.Assembly.LoadFile and

GetCustomAttributes - AssemblyFileVersionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVersionAttribute.

Can anyone help?

Thanks,

Tee

Jul 21 '05 #2
If you want to know the version of your assembly you can use:

Assembly.GetAssembly(typeof(Form1)).GetName().Vers ion.ToString()

Where Form1 is a class defined in the assembly you want to know the version
of.
If you want to know the framework the application is using you could use a
class defined in the framework like:

Assembly.GetAssembly(typeof(int)).GetName().Versio n.ToString()
Jul 21 '05 #3
Try

using System.Reflection;

Assembly.GetExecutingAssembly().GetName().Version. ToString()

--
Ben Strackany
www.developmentnow.com
"Tee" <th*@streamyx.com> wrote in message
news:ud**************@tk2msftngp13.phx.gbl...
Hi,

How can we check an assembly's version that is created in .NET?

I have tried to load the assembly using
System.Reflection.Assembly.LoadFile and

GetCustomAttributes - AssemblyFileVersionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVersionAttribute.

Can anyone help?

Thanks,

Tee

Jul 21 '05 #4

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

Similar topics

5
1772
by: Martin Hazell | last post by:
I am just writing an app that will be used internally. What I would like it to do is to check the version of an exe on a server is different to the current one. I have managed to get the...
3
10817
by: Tee | last post by:
Hi, How can we check an assembly's version that is created in .NET? I have tried to load the assembly using System.Reflection.Assembly.LoadFile and GetCustomAttributes -...
6
4047
by: Richard Loupatty | last post by:
Hi all, Does someone know what this mean: The check of the signature failed for assembly 'Infragistics.WebUI.UltraWebGrid.v2' I also did a post to Infragistics but maybe this is a general...
6
337
by: Richard Loupatty | last post by:
Hi all, Does someone know what this mean: The check of the signature failed for assembly 'Infragistics.WebUI.UltraWebGrid.v2' I also did a post to Infragistics but maybe this is a general...
0
7132
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
7009
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
7178
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,...
1
6899
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
7390
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
5475
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
4919
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
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.