Obtain assembly version numbers

  • Thread starter Thread starter Juan
  • Start date Start date
J

Juan

Hi:

How can obtain assembly version numbers?
I can obtain it from System.Reflection.AssembyName, but, how can obtain this
class without
using an absolute path to the assembly?
is there another way to obtain those numbers?

Thanks
Juan
 
If you want the version of the assembly you are currently in you can use

System.Reflection.Assembly.GetExecutingAssembly().GetName().Version

Or if you have this code in a dll and want to get the version of the exe or
dll which is calling into it use

System.Reflection.Assembly.GetCallingAssembly().GetName().Version

Peter
 
Back
Top