[Mono-dev] Embedding Mono as Script Engine (problem?)

BaSS bassraf at gmail.com
Wed Aug 13 17:53:00 EDT 2008


Hi Guys,
I’m trying to embed the mono runtime into a test application and then pass “script” code to a class in the assembly which is supposed to compile the script into an assembly and run it (etc etc..).
The basics seem to work, I can call methods in the class, show message boxes etc, but whenever I try to call these (below) lines inside the assembly’s class things go wrong:
 
MessageBox.Show("Before");
CompilerResults cr = Provider.CompileAssemblyFromSource(cparams, Script);
MessageBox.Show("After");

Without the line “Compiler Results cr = …..” things are still fine, the two message boxes show and all other code executes, but when I include the line that should actually compile the “script” my test application simply disappears and hangs somewhere in the background…
When I test the assembly using a .net test application and simply reference the assembly, create the object and execute the same code.. it works! It just doesn’t work when I exec this code using the mono.dll directly using the API directly..
 
Any clues, hints, ideas?
 
Thanks for the great work, 
Regards,
Bas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080813/dbc0112c/attachment-0001.html 


More information about the Mono-devel-list mailing list