❔ System.TypeLoadException
Having an issue where my native bindings project (using objective-sharpie) expects a class to exist in the Xamarin.Mac assembly but when it runs in some of my projects it hits:
System.TypeLoadException : Could not resolve type with token 01000012 from typeref (expected class 'ObjCRuntime.ThrowHelper' in assembly 'Xamarin.Mac, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065')
I built the my package on Xamarin 9.0.1.2 and the application is being built into an application w/ 9.0.1.5. Is this mismatch the problem? What else might be the issue?
3 Replies
Never seen that kind of error before
But that looks very Xamarin specific
At least presumably ObjCRuntime is a Xamarin thing
Version=0.0.0.0 seems a bit odd
Yes I think it is shipped w/Xamarin https://learn.microsoft.com/en-us/dotnet/api/objcruntime?view=xamarin-mac-sdk-14
ObjCRuntime Namespace
The ObjCRuntime namespace provides classes for binding Objective-C types with the Mono managed runtime.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.