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 on
Developer Community or GitHub 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.
I've noticed that Java's @deprecated annotations aren't mapped to C#'s [Obsolete] attributes in Xamarin members (classes, interfaces, methods, properties, events). For example:
android.view.View class's public void setBackgroundDrawable(android.graphics.drawable.Drawable) method is flagged with @deprecated annotation, but in corresponding C# class, there is no System.Obsolete attribute for matching. This occurs in other classes also.
public java.lang.String(byte, int) constructor is deprecated, but it isn't flagged with Obsolete attribute in Xamarin.Android's bind for this class.
We may inadvertently be using obsolete APIs.
Thanks a lot for helping me.
The problem is that our generator doesn't consistently look at the @deprecated information, and thus doesn't generate [Obsolete] when it should.
Dean: See Method.cs!Generate(), and note that it doesn't check the Deprecated property (unlike e.g. GenerateDeclaration()).
Fixed in monodroid/master/9913daff
I have checked this issue with following builds:
Microsoft Visual Studio Professional 2013
Version 12.0.21005.1 REL
Microsoft .NET Framework
Installed Version: Professional
Xamarin 22.214.171.124 (f06bad7)
Xamarin.Android 126.96.36.199 (d507ba60cc907073c9b40ebc88bab6311b748c20)
Xamarin.iOS 188.8.131.52 (8dc6ec80fb6f7c1ec874ad67ffca859cdad94282)
I have checked the definition of "setBackgroundDrawable" and few other method which is deprecated in android and observed that they are mapped with C# "Obsolete" attribute.
This issue has been fixed. Hence, I am closing this issue.
I'm very happy about this news, thanks a lot for help me. Where I can download Xamarin for Visual Studio 184.108.40.206? Or it is an internal alpha release of Xamarin.Android 5.0?
Thanks a lot :D
Has a version containing this fix been released? I've got the same problem and I don't know if I have an old version of if I have hit another case of the same bug.
@Dimitar This bug was fixed in Xamarin.Android 5.0 but is not public yet. Please look at here http://developer.xamarin.com/releases/android/xamarin.android_5/xamarin.android_5.0/
Thanks, it's not fatal, I only needed to know whether to file a new bug.