Hi,
does anyone have any sample VB.NET code to find the
version number of an Assembly? I would like to display
the version number of the Windows form in its "About..."
dialog box. I see that there is a
System.Reflection.AssemblyInformationalVersionAttribute
class but cannot figure out how to retrieve it for an
Assembly.
Thanks in advance,
Ron
Phil Wilson - 12 Jan 2004 18:24 GMT
Something like Assembly.GetExecutingAssembly.GetName.Version will get you to the
Version.

Signature
Phil Wilson [MVP Windows Installer]
----
> Hi,
>
[quoted text clipped - 8 lines]
> Thanks in advance,
> Ron
Todd A - 12 Jan 2004 18:50 GMT
Try this:
Dim myFileVersionInfo As System.Diagnostics.FileVersionInfo =
System.Diagnostics.FileVersionInfo.GetVersionInfo("<Your DLL Name>.dll")
Label100.Text = "VERSION: " & myFileVersionInfo.ProductVersion
> Hi,
>
[quoted text clipped - 8 lines]
> Thanks in advance,
> Ron
Klaus H. Probst - 17 Jan 2004 07:18 GMT
Something like this:
Version v = Assembly.GetExecutingAssembly().GetName().Version;
string s = string.Format("{0:0}.{0:00}.{0:000}.{0:0000}", v.Major, v.Minor,
v.Revision, v.Build);

Signature
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/
> Hi,
>
[quoted text clipped - 8 lines]
> Thanks in advance,
> Ron