如何获得大会版本(而不是文件版本),另一个EXE? [英] How to get Assembly Version (not File Version) for another EXE?

查看:144
本文介绍了如何获得大会版本(而不是文件版本),另一个EXE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以使用以下方法来获取文件版本:

You can use the following to get the File Version:

FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo("filename.exe");

但是,你怎么能得到大会版本特定EXE文件?

But how can you get the Assembly Version for a specific EXE file?

推荐答案

从这个博客的文章<一个href="http://blogs.msdn.com/alejacma/archive/2008/09/05/how-to-get-assembly-version-without-loading-it.aspx">How获取程序集的版本,而无需加载它:

AssemblyName.GetAssemblyName("filename.exe").Version

这避免了加载组件的法律约束条款。

This avoids having to load the assembly in its entirity.

这篇关于如何获得大会版本(而不是文件版本),另一个EXE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆