So we are running into this issue when running unit tests
committed 06:01PM - 27 Sep 17 UTC
In mono_image_create_token we are passed in a managed reflection object and we
n… eed to create a token for it and optionally register it so that we can resolve
that token back to a runtime structure and managed object later.
For a MonoReflectionMethod object that refers to a method from outside the
current dynamic image, we need to generate a memberref token. It will be the
same token for the same underlying MonoMethod*. When we go to register the
token with mono_dynamic_image_register_token we need to pass a managed object.
Unfortunately two MonoReflectionMethod objects could refer to the same
MonoMethod* but differ in their ReflectedType, so just registering the
passed-in MonoReflectionMethod means we could assert in
mono_dynamic_image_register_token because previously we may have registered the
same method via a different ReflectedType.
So what we do is we cal mono_method_get_object_handle with NULL for the
reflected type - which corresponds to just using the DeclaringType of the given
MonoMethod*.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=59364
Will this mono update be included in this coming weekends update?
If it’s included in the Visual Studio for Mac updates then it definitely will be; we install all the updates presented in the VS for Mac updater, every week.
In case you’d need a specific Mono version, in general or just temporarily, you can install one the way it’s described here: How to install specific version of Mono on MacOS / Visual Studio for Mac / Xamarin stack