Bug 58932 - Xamarin.Android binding library generates unnecessary keyword
Summary: Xamarin.Android binding library generates unnecessary keyword
Status: NEEDINFO
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 7.4 (15.3)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2017-08-21 17:15 UTC by Tuyen Duc Vu
Modified: 2018-04-13 08:06 UTC (History)
6 users (show)

Tags:
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 58932 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 original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • 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:
Status:
NEEDINFO

Description Tuyen Duc Vu 2017-08-21 17:15:15 UTC
With latest update v7.1, VSfM always says
```
warning CS0109: The member 'BottomSheetDialogFragment.java_class_handle' does not hide an accessible member. The new keyword is not required.
```
for any generated classes. So, it's hard to find out which warnings we need to fix while creating Android binding library.

There are no warnings like this in previous version.
Comment 1 Jon Douglas [MSFT] 2017-08-28 17:57:05 UTC
(In reply to Tuyen Duc Vu from comment #0)
> With latest update v7.1, VSfM always says
> ```
> warning CS0109: The member 'BottomSheetDialogFragment.java_class_handle'
> does not hide an accessible member. The new keyword is not required.
> ```
> for any generated classes. So, it's hard to find out which warnings we need
> to fix while creating Android binding library.
> 
> There are no warnings like this in previous version.

Hi Tuyen Duc Vu,

Please take a look at our "How to file a bug" page to help clarify some items:

https://bugzilla.xamarin.com/page.cgi?id=bug-writing.html

The items we would be interested in are:

- Steps to reproduce with a reproduction project (A minimal test case from a File->New Project)
- Actual Results (What is actually happening?)
- Expected Results (What is expected to happen?)
- Version Information (Visual Studio for Mac -> About Visual Studio for Mac)

Please feel free to add these items and we will take a further look into this bug! Thanks for the report!

This issue is most likely related to https://bugzilla.xamarin.com/show_bug.cgi?id=58533 in which the "new" keyword is added and causes VS4Mac to throw an error. You can probably add a <NoWarn>CS0109</NoWarn> element in your .csproj to get rid of this warning temporarily.
Comment 2 mwesolowski 2017-09-18 13:43:34 UTC
Same here.

We dont have access to https://bugzilla.xamarin.com/show_bug.cgi?id=58533 so could you please summarise it?

How "temporary" is the fix, what is the ETA of the solution?
Comment 3 Jon Douglas [MSFT] 2017-09-18 14:17:05 UTC
(In reply to mwesolowski from comment #2)
> Same here.
> 
> We dont have access to https://bugzilla.xamarin.com/show_bug.cgi?id=58533 so
> could you please summarise it?
> 
> How "temporary" is the fix, what is the ETA of the solution?

Apologies. The summary of the issue is:

Extraneous 'new' in generated binding code causes CS0109 warning

As it currently stands, this is a warning and can be worked around by adding the following to your .csproj:

<NoWarn>CS0109</NoWarn>

We are currently determining if this issue is a regression or expected behavior from new changes to generator code.