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
 

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

Back
Top