Determining version of a DLL

  • Thread starter Richard L Rosenheim
  • Start date
R

Richard L Rosenheim

Can someone point to some sample VB.NET code for extracting the version
number from a DLL? Specifically, I would like to retrieve the version
number of mscorcfg.dll.

TIA,

Richard Rosenheim
 
G

Guest

This is how to do what you need:

Dim strFrameworkDirectory As String =
Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
Dim strFile As String = strFrameworkDirectory & "mscorcfg.dll"
Dim fviFilename As System.Diagnostics.FileVersionInfo =
System.Diagnostics.FileVersionInfo.GetVersionInfo(strFile)
MessageBox.Show(fviFilename.ProductVersion)
 
R

Richard L Rosenheim

Thank you very much -- I was looking in the FileInfo class...

Richard Rosenheim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top