Bug 38515 - Application.ProductVersion not populated correctly from AssemblyInformationalVersion attribute
Summary: Application.ProductVersion not populated correctly from AssemblyInformational...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms (show other bugs)
Version: 4.2.0 (C6)
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
Depends on:
Reported: 2016-02-06 07:32 UTC by Hin-Tak Leung
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Hin-Tak Leung 2016-02-06 07:32:00 UTC
this.ProductionVersion of a System.Windows.Forms application is supposed to get the info from AssemblyVersion Attribute.
But it does not. I don't know where it is getting the info from, but it is wrong. The same binary work correctly under wine + .net2.

A macintosh user (running a mono mkbundled binary) reports that "Help", "About Font Validator" shows 1.0 instead of 1.1.

I looked at the code a bit, and anyway, "mono FontVal.exe" on native Linux shows 1.0, but the same binary under wine + dotnet framework 2 installed with winetricks (instead of wine-mono) shows 1.1 . So native mono on linux is not behaving correctly compared to dotnet framework 2 under wine.  

Here is the binary bundle. Just unzip and run FontVal.exe under mono vs dotnet, and look at 'Help', 'about...'

Comment 1 Hin-Tak Leung 2016-02-06 19:27:27 UTC
Sorry, please ignore the posted binary url and much of the info. I was already starting to play with AssemblyInformationalVersion , which indeed behaves differently under mono vs under dotnet, so there is indeed a bug, just not where I said it was.
Comment 2 Hin-Tak Leung 2016-02-08 20:25:49 UTC
I have another binary built with Microsoft visual c#. Comparing with it, I think I found another bug. There seems to be two bugs relating to this, one to do with the mono compiler and the other to do with the mono runtime:

- the mono compiler does not copy AssemblyVersion into System.Diagnostics.FileVersionInfo, the Microsoft compiler does.

- the mono runtime does not copy System.Diagnostics.FileVersionInfo
into System.Windows.Forms Application.ProductVersion, the Microsoft dot net runtime does.

Note You need to log in before you can comment on or make changes to this bug.