本文介绍了获取特定dll的版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的项目中使用了"caddatabase.dll",我想获取dll的版本号.
在此先感谢
i have used "caddatabase.dll" in my project,i want to get the version number of the dll..how to do this??
thanks in advance
推荐答案
Assembly assembly = Assembly.LoadFrom("MyAssembly.dll");
Version ver = assembly.GetName().Version;
您可以获取我在这里提到的dll版本.
You can get the version of the dll as i mentioned here.
Assembly assembly = Assembly.LoadFrom("MyCustomAssembly.dll");
Version ver = assembly.GetName().Version;
您还可以使用System.Reflection.Assembly.Load()
方法,然后在AssemblyInfo
中获取所有信息: Assembly.Load方法 [ ^ ]
You can also use System.Reflection.Assembly.Load()
methods and then get all the information in AssemblyInfo
: Assembly.Load Method[^]
这篇关于获取特定dll的版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!