开发者

How to get Assembly Version (not File Version) for another EXE?

开发者 https://www.devze.com 2022-12-28 04:06 出处:网络
You can use the following to get the File Version: FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(\"filename.exe\");

You can use the following to get the File Version:

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

But how can you get the Assembly Version for a specific EXE fi开发者_高级运维le?


From this blog article How to get assembly version without loading it:

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

This avoids having to load the assembly in its entirity.

0

精彩评论

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