assembly version

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
How can I find out the version of my assembly
programmatically? I have set the version of my assembly to
a specific number in my AssemblyInfo.cs file. Which method
or class do I use in my program to find out the version
that is set in the assemblyInfo.cs file?
Thanks a lot for your help.
 
At the top of your module include the following imports...

using System.Diagnostics;
using System.Reflection;

....then do the following to get your assembly version programmatically...

string versionstring;

versionstring =
FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).Fil
eVersion;


Hope this helps,

Gary
 
Back
Top