Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

Get Assembly version

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dinuks@gmail.com - 17 Jul 2006 08:59 GMT
Hi,

Does anyone know what the simplest way to retrieve the version number
of a referenced DLL is?

Thanks for all the help....

Dinu
Herfried K. Wagner [MVP] - 17 Jul 2006 11:37 GMT
<dinuks@gmail.com> schrieb:
> Does anyone know what the simplest way to retrieve the version number
> of a referenced DLL is?

Solution for referenced assemblies:

\\\
With Me.ListView1
   .View = View.Details
   Dim c1 As New ColumnHeader
   c1.Text = "Library"
   c1.Width = 140
   Dim c2 As New ColumnHeader
   c2.Text = "Version"
   c2.Width = 80
   .Columns.AddRange(New ColumnHeader() {c1, c2})
   For Each m As AssemblyName In _
       [Assembly].GetExecutingAssembly().GetReferencedAssemblies()

       Dim lvi As New ListViewItem
       lvi.Text = m.Name
       lvi.SubItems.Add(m.Version.ToString())
       .Items.Add(lvi)
   Next m
End With
///

For the other DLLs, you could use the 'FileVersionInfo' class to get the
files' version numbers.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>

jimbo_dk - 18 Jul 2006 02:06 GMT
Works like a charm. FileversionInfo was what I was looking for.

Thanks a lot for the help.

Dinu

> <dinuks@gmail.com> schrieb:
> > Does anyone know what the simplest way to retrieve the version number
[quoted text clipped - 30 lines]
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.