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 have a class that implements a Java interface defined in a .jar and converted to C# using a binding project. The compilation is successful until I do the following changes:
- The interface has a method with a parameter of type 'long' and the class contains some constants to be used. I want to change this into an enum.
- I create the enum in EnumFields.xml:
<mapping clr-enum-type="MyEnum" jni-class="com/company/myClass">
<field clr-name="First" jni-name="FIRST_VALUE" value="0" />
<field clr-name="Second" jni-name="SECOND_VALUE" value="1" />
- I change the parameter type of the interface method in EnumMethods.xml:
<method jni-name="methodName" parameter="type" clr-enum-type="MyEnum" />
- I now get the following error:
Error: MyCSharpClass is not abstract and does not override abstract method methodName(long) in iInterface
- Double-clicking on the error shows that Java version of my C# class (in the obj folder) contains the method but its parameter type is int:
public void methodName(int p0)
This is related to bug #27307 I reported before.
Unfortunately it is not possible for non-integer parameters and return values. You need to write non-enum-specific metadata xml changes.