How to find the version of Assembly Calling Program?

I am using C # for this application.

I have a DLL that goes into my application. From this DLL I need to find the build version of the main program in which this DLL is included.

System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() does not return what I want. This returns the version of the DLL assembly, not the main program.

How to get version information from the main program?

+6
c # dll version assemblies
source share
2 answers
 System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString() 

is correct.

+18
source share

to try:

 Application.ProductVersion.ToString(); 
0
source share

All Articles