Inline mono with multiple assemblies

I am working on nesting mono inside my C ++ application in order to use C # as the scripting language in the application. On the C ++ side, I was able to initialize a mono runtime, create managed objects and call them from those objects as well. On my build side, I tried to separate some boilerplate code specific to my scripting system into a separate assembly so that script authors can focus on the code they need to write. The pattern combination contains some abstract classes as well as other utility classes. Some mono classes in the assembly I load on the C ++ side extend some of the abstract classes from the template assembly. After that, when I try to create any mono objects from the C ++ side, I get the following error:

Missing method .ctor in assembly <assembly name>, type
System.Runtime.Versioning.TargetFrameworkAttribute
Can't find custom attr constructor image: <assembly name> mtoken: 0x0a000011
* Assertion at class.c:5607, condition `!mono_loader_get_last_error ()' not met

      

What would cause this error in my situation and in general, how do you use classes from multiple assemblies when nesting mono?

+3


source to share





All Articles