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 ()
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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 38515 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

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.