On 07.08.2012 22:32, Francois Schelling wrote:
Hi,
I'm new with Mono and I'm having a problem to get my project running.
I've created a C++ console application in which I would like to embed
a C# dll. I'm able to open my C# dll but once I try to invoke a
function on my C# object, I got the following error:
Missing method .ctor in assembly
D:\projects\monoscripting\monoscripting\monoscript.dll, type
System.Runtime.Versioning.TargetFrameworkAttribute Can't find custom
attr constructor image:
D:\projects\monoscripting\monoscripting\monoscript.dll mtoken:
0x0a00000d
...
I've added the following code to see the content of my class and the
constructor seems to be there:
It's not your .ctor missing. It's an issue with
TargetFrameworkAttribute..ctor.
This basically means that you didn't initialize the runtime correctly.
Under Windows, you have to call
mono_set_dirs("c:\\mono\\lib", "c:\\mono\\etc");
just before mono_jit_init.
Replace "c:\mono" with the root of your Mono installation.
Robert
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list