How get the version of the DLL ??

  • Thread starter Thread starter lb
  • Start date Start date
L

lb

Hi,

I would like to get the version of the DLL by programming in vbnet (what one
finds in the properties with the right click button).

How may i do ??

Thank you!!!
 
lb said:
I would like to get the version of the DLL by programming in vbnet (what
one finds in the properties with the right click button).

\\\
MsgBox( _
System.Reflection.Assembly.GetExecutingAssembly( _
).GetName().Version.ToString() _
)
///
 
Are you talking about the file version of the executing assembly like
Herfried answered for or getting the file version info of any file/dll?

Here's how to get the file version of any file like the properties dialog
shows:

Dim strPath As String =
Environment.GetFolderPath(Environment.SpecialFolder.System).ToString
Dim strFile As String = IO.Path.Combine(strPath, "User32.dll")

Dim fvi As System.Diagnostics.FileVersionInfo = _
System.Diagnostics.FileVersionInfo.GetVersionInfo(strFile)

MessageBox.Show(String.Format("'User32.dll' version is: {0}", _
fvi.FileVersion.ToString), "File Version Info Example")

The above gets the file version of the 'User32.DLL' file & displays it in a
message box.
 
Back
Top