473,394 Members | 1,674 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,394 software developers and data experts.

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
Nov 21 '05 #1
3 993
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

Nov 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()
Nov 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

Nov 21 '05 #4

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

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
3
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 -...
2
by: jwexqm | last post by:
I'm using a COM DLL from a C# application via an interop wrapper generated by 'tlbimp.exe'. That all works fine, I can fire off methods and things happen as they should. My issue is that I want...
5
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...
6
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...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.