I am working on embedding mono inside my C++ application to utilize C# as a scripting language within the application. On the C++ side I've been able to initialize the mono runtime, create managed objects, and call to and from these objects. On my mono assembly side, I've tried to factor out some boilerplate code specific to my scripting system into a separate assembly to allow script authors to be pretty focused on the code they have to write. The boilerplate assembly contains some abstract classes as well as other utility classes. Some mono classes in the assembly I'm loading on the C++ side extend some abstract classes from the boilerplate assembly. After I did this, when I try to create any mono objects from the C++ side, I'm getting 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 be causing this error in my situation, and in general, how do you use classes from multiple assemblies when embedding mono?