Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 59110 on
Developer Community or GitHub 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
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
As of today, Xamarin.iOS only exists as a Xamarin.iOS10, regardless of the installed version of the underlying mono BCL version.
This creates situations where new APIs are added (e.g. Dictionary<>.GetValueOrDefault or Array.Empty<T>() that were added recently) where that can create backward compatibility issues. Compiling a library using the latest VS might produce code that may not be valid using a previous version of Xamarin. Previous versions of Xamarin are very often used in the context of build servers, and/or for long standing applications where updating to the latest Xamarin build may not make sense (particularly VS2015 vs. VS2017).
Both Xamarin.iOS and Xamarin.Android have this issue, and there should be a way to include in the TargetFramework the mono version that was used to build an assembly, and the Xamarin installer should provide a way to install the different framework versions, the same way netcore and netfx are published today.
I can imagine this to be an issue for libraries only. However if you are writing general purpose library we already suggest to target/use netstandard which has targetable API.
@marek This is a library only issue indeed.
The libraries I'm talking about are iOS and Android specific libraries, netstandard does not apply in this context.
Why do you think netstandard does not apply in this context? You can achieve what you asked for by targeting netstandard
The libraries I'm developing explicitly use iOS and Android APIs, therefore those cannot be built using netstandard.
Yet another case of flip/flop for APIs being added moved: https://github.com/mono/corefx/blob/master/src/System.Collections/src/System/Collections/Generic/CollectionExtensions.cs#L9 in reaction to this thread: https://github.com/xamarin/xamarin-android/pull/631#issuecomment-321092650
The presence of the method on Dictionary<K,V> was breaking binary compatibility for code that references a later version of Xamarin, and now, this creates a compilation break because two extension methods with the same signature fail with an ambiguous match.
Allowing for specific framework versions would again greatly help.