krystian71115
krystian71115

Reputation: 1937

How to run C# code using mono without Xamarin in Android?

I want to create a program that uses mono runtime to run C# code (binary not application).

I copied libmono.so from Unity app and I'm write code using this documentation:

http://www.mono-project.com/docs/advanced/embedding/

and it's working but i have a problems with references i can only access classes from mscorlib.dll and I have problems with System.Reflection.Assembly class it throwing exception, when i print it to console i see:

System.MissingMethodException: Method not found: 'System.Reflection.Assembly.op_Inequality'

Can i fix it?

Can i use mono runtime in C binary on Android?

PS. I'm using Android to tests.

Edit: I found a solution for loading libraries, it need to set environment variable MONO_PATH to libraries path.

But i have still problems with Assembly class.

Upvotes: 1

Views: 1062

Answers (1)

knocte
knocte

Reputation: 17979

The System.MissingMethodException error you have seems like a .NET Profile mismatch error, like the one explained here.

Can i use mono runtime in C binary on Android?

Yes, using the NDK I guess. But there are some alternatives which you can use instead of rolling your own, such as XmaDevLab.

Upvotes: 1

Related Questions