[Mono-devel-list] Error with Reflection.Emit : External Module Files Not Supported

Paolo Molaro lupus at ximian.com
Mon Jan 3 04:14:59 EST 2005


On 01/01/05 John Bailo wrote:
> I am playing with this sample code, illustrating Reflection.Emit ( I've 
> already used it successfully in Windows ).
> 
> http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=238
> 
> I can compile the code that creates the emitted assembly in mono/linux, but 
> when I go to run it, it reports:
> 
> jbailo at linux:~/MonoDevelopProjects/QuoteOfTheDay/DynAsmSample/bin/Debug> ./qot.exe 
> QuoteOfTheDay.dll
> Uncaught exception: System.NotSupportedException: External module files are 
> not supported
[...]
> Can mono not create emitted asseblies ?

Yes, it can, since a few years ago:-)
The exception message above doesn't come from mono.
The issue here is that you likely installed portable.net and that registered
itself with the kernel to run CIL programs, so when you run the program
with:
	./qot.exe ...
you actually run it with the buggy portable.net runtime instead of with mono.

I suggest always running .net programs explicitly with:
	mono program.exe ...args...
so there is no chance of confusing mono with other runtimes that lack
many features we implemented.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list