开发者

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜