如何读取文件版本? [英] How to read file Version?

查看:63
本文介绍了如何读取文件版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
正在使用自动更新程序,更新程序将检查3个文件的版本.如何读取文件版本????

谢谢!

Hello,
am working on a auto updater, and the updater will check the version of 3 files. How can i read the file version ???

Thanks!

推荐答案

我们无法回答.

我们不知道文件是什么,它们包含什么,它们如何存储版本信息,或者甚至它们确实包含版本信息!

如果创建了文件,那么您就会知道它们的存储方式.
如果没有,那么您需要查看文件格式规范.


"DLL文件和EXE文件.由exe文件写入的dll文件."


试试:
We can''t answer that.

We have no idea what the files are, what they contain, how they store version info, or even if they do contain version information!

If you created the files, then you know how they store it.
If you didn''t, then you need to look at the file format specification.


"Dll files and EXE file. the dll file written by the exe file."


Try:
string fileVersion = FileVersionInfo.GetVersionInfo(file).FileVersion;
string productVersion = FileVersionInfo.GetVersionInfo(file).ProductVersion;




是VB 2008"

编号:O
但是转换非常简单!
试试:




"is it VB 2008"

No. :O
But the conversion is pretty simple!
Try:

Dim fileVersion As String = FileVersionInfo.GetVersionInfo(file).FileVersion
Dim productVersion As String = FileVersionInfo.GetVersionInfo(file).ProductVersion


这篇关于如何读取文件版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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