473,624 Members | 2,248 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.Reflecti on.Assembly.Loa dFile and

GetCustomAttrib utes - AssemblyFileVer sionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVer sionAttribute.

Can anyone help?

Thanks,

Tee
Nov 16 '05 #1
3 10829
Try Assembly.GetNam e().Version.
"Tee" <th*@streamyx.c om> wrote in message
news:ud******** ******@tk2msftn gp13.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.Reflecti on.Assembly.Loa dFile and

GetCustomAttrib utes - AssemblyFileVer sionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVer sionAttribute.

Can anyone help?

Thanks,

Tee

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

Assembly.GetAss embly(typeof(Fo rm1)).GetName() .Version.ToStri ng()

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.GetAss embly(typeof(in t)).GetName().V ersion.ToString ()
Nov 16 '05 #3
Try

using System.Reflecti on;

Assembly.GetExe cutingAssembly( ).GetName().Ver sion.ToString()

--
Ben Strackany
www.developmentnow.com
"Tee" <th*@streamyx.c om> wrote in message
news:ud******** ******@tk2msftn gp13.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.Reflecti on.Assembly.Loa dFile and

GetCustomAttrib utes - AssemblyFileVer sionAttribute, but couldn't get the
proper data, some of assemblies seem doesn't have
AssemblyFileVer sionAttribute.

Can anyone help?

Thanks,

Tee

Nov 16 '05 #4

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

Similar topics

2
8790
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 configuration every time there is an update to a shared assembly.
3
1798
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 - AssemblyFileVersionAttribute, but couldn't get the proper data, some of assemblies seem doesn't have AssemblyFileVersionAttribute.
2
9809
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 my application to check both that the COM DLL is registered on the system and its version is acceptable. I envisage a bit of code at the beginning of the application's runtime that performs these checks. I've got a 'soup' of ideas about how to...
5
1787
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 assembly version for the app executing, but I don't know how to read the version info for a file on a network share. Any help would be greatly appreciated.
6
4064
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 problem and someone can tell me about it?
10
3436
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 somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
7
10949
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 this screen below. Please help, thanks in advance... Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify...
1
2246
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 I have pasted the part I'm interested in below. My company doesn't use versioning or the gac and I'd like to. We're on vs.net 2005 & .net 2., is this still true or has it changed since then? thanks That article is not entirely accurate. ...
0
8170
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8619
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8474
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6108
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5561
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4078
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2604
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 we have to send another system
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.