[Mono-bugs] [Bug 524988] New: System.Diagnostics.FileVersionInfo.FileVersion fails with non-managed binaries
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jul 24 08:22:32 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=524988
Summary: System.Diagnostics.FileVersionInfo.FileVersion fails
with non-managed binaries
Classification: Mono
Product: Mono: Runtime
Version: 2.4.x
Platform: x86-64
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: apenn at hchb.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.1)
Gecko/20090715 Firefox/3.5.1 (.NET CLR 3.5.30729)
I built an application that fetches the file version information from various
binaries, both managed and non-managed. On Windows, you can use
System.Diagnostics.FileVersionInfo's FileVersion string to get this for both
managed and non-managed binaries. In Mono, this seems to work only for managed
binaries, and is blank for non-managed ones. However, Mono can get the
information if you piece together all of the individual version components for
a non-managed binary:
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(path);
r = "Version=";
//r += fvi.FileVersion; // does not work in Mono, is blank
// WORKAROUND:
r += Convert.ToString(fvi.FileMajorPart);
r += "." + Convert.ToString(fvi.FileMinorPart);
r += "." + Convert.ToString(fvi.FileBuildPart);
r += "." + Convert.ToString(fvi.FilePrivatePart);
Can FileVersion be fixed? Thank you.
Reproducible: Always
Steps to Reproduce:
See details
Actual Results:
System.Diagnostics.FileVersionInfo.FileVersion is blank with non-managed
binaries.
Expected Results:
System.Diagnostics.FileVersionInfo.FileVersion should have the file version
string assembled from the individual version components that ARE populated.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list