Bug 51626 - AppDomain::GetTargetFrameworkName() returns 4.5 but Mono ships newer API
Summary: AppDomain::GetTargetFrameworkName() returns 4.5 but Mono ships newer API
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2017-01-18 21:43 UTC by Sebastien Pouliot
Modified: 2017-01-20 22:29 UTC (History)
2 users (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 on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sebastien Pouliot 2017-01-18 21:43:22 UTC
Right now BinaryCompatibility.TargetsAtLeast_Desktop_V4_5_1 returns false.

That's because it's based on it’s based on parsing `System.AppDomain::GetTargetFrameworkName()` which returns 4.5 so some API will behave differently than MS in 4.5.1 (or more) even if the code is identical

However if we're shipping 4.5.1+ / 4.6 API then they should behave like MS .NET.
Comment 1 Marek Safar 2017-01-20 15:36:44 UTC
Sebastien, is that really master?

Comment 2 Sebastien Pouliot 2017-01-20 19:00:40 UTC
@Marek, no it was mono-4.8.0-branch originally and then I looked if `System.AppDomain::GetTargetFrameworkName()` was returning the same string on mono/master (and it did)


and not the property itself. Maybe that's worth updating ? not sure if it's still reachable from user code !?!
Comment 3 Marek Safar 2017-01-20 22:29:30 UTC
I have removed the method