Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jnimarshalmethod-gen] Fix registration on Windows #721

Merged

Commits on Sep 18, 2020

  1. [jnimarshalmethod-gen] Fix registration on Windows

    Set parameters to registration method builder, to get rid of exception
    we are getting on Windows. Looks like the S.L.E code still differs
    between Windows and Mac.
    
    Also report adding registration methods in verbose mode, similar as we
    do with marshal methods.
    
    The ArgumentOutOfRangeException mentined above:
    
        error JM4006: jnimarshalmethod-gen: Unable to process assembly '.\bin\TestDebug\Java.Interop.Export-Tests.dll'
        Specified argument was out of the range of valid values.
        Parameter name: The specified parameter index is not in range.
        System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
        Parameter name: The specified parameter index is not in range.
           at System.Reflection.Emit.MethodBuilder.DefineParameter(Int32 position, ParameterAttributes attributes, String strParamName)
           at System.Linq.Expressions.Compiler.LambdaCompiler..ctor(AnalyzedTree tree, LambdaExpression lambda, MethodBuilder method)
           at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, MethodBuilder method, DebugInfoGenerator debugInfoGenerator)
           at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.AddRegisterNativeMembers(TypeBuilder dt, ParameterExpression targetType, List`1 registrationElements) in C:\Users\rodo\git\java.interop\tools\jnimarshalmethod-gen\App.cs:line 564
           at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateMarshalMethodAssembly(String path) in C:\Users\rodo\git\java.interop\tools\jnimarshalmethod-gen\App.cs:line 426
           at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.ProcessAssemblies(List`1 assemblies) in C:\Users\rodo\git\java.interop\tools\jnimarshalmethod-gen\App.cs:line 201
    radekdoulik committed Sep 18, 2020
    Configuration menu
    Copy the full SHA
    31572fe View commit details
    Browse the repository at this point in the history