How do I find Assembly Version of Calling Program?
I am using C# for this application.
I have a DLL that gets included within my application. From this DLL, I need to find the Assembly 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 Assembly version of the DLL, not the main program.
How do I get the version information from the main 开发者_如何学Cprogram?
System.Reflection.Assembly.GetEntryAssembly().GetName().Version.ToString()
is the right one.
try:
Application.ProductVersion.ToString();
精彩评论