有人知道为什么我在windows属性和visual中有不同的可执行文件版本?


我在查询同一个文件..。当然了!我错过了什么..。
这是我的密码:
private string getFileVersion(string filePath)
{
try
{
return FileVersionInfo.GetVersionInfo(filePath).FileVersion;
}
catch (FileNotFoundException ex)
{
mLogFile.addLogEntry("XML file. " + ex.Message);
return null;
}
}更新:我正在查询的文件不是项目可执行文件。
谢谢
发布于 2015-02-18 13:58:14
该应用程序的开发人员没有更新"FileVersion“字符串以匹配其他属性中的信息。

根据以下信息生成文件版本信息:
FileVersionInfo info = FileVersionInfo.GetVersionInfo(filePath);
String version = String.Format("{0}.{1}.{2}.{3}", info.FileMajorPart
, info.FileMinorPart
, info.FileBuildPart
, info.FilePrivatePart);https://stackoverflow.com/questions/28584792
复制相似问题