[Mono-dev] Looking to programmatically build assembly with Mono.CSharp
Miguel de Icaza
miguel at xamarin.com
Sat May 31 01:34:29 UTC 2014
It is not hard to do.
It will take someone a couple of hours to figure out what needs to be
In addition, I just realized something important. Mono.CSharp is compiled
with the System.Reflection.Emit backend which has several problems, you are
better off compiling your own Mono.CSharp.Batch for example that uses the
IKVM.Reflection backend (which is what the mcs.exe batch compiler uses).
On Fri, May 30, 2014 at 9:31 PM, Brandon Perry <bperry.volatile at gmail.com>
> Oh, not a problem at all. I currently invoke the compiler via Process, but
> was hoping to get away from that.
> Thanks for the quick response. :)
> On Fri, May 30, 2014 at 8:30 PM, Miguel de Icaza <miguel at xamarin.com>
>> The interface surfaced by Mono.CSharp does not provide what you want.
>> It is designed to generate code for runtime evaluation.
>> You could hack the existing source code to achieve something similar, it
>> is not too hard, but it was never a priority.
>> On Fri, May 30, 2014 at 7:03 PM, Brandon Perry <bperry.volatile at gmail.com
>> > wrote:
>>> Looking to do something similar to this blog post here, but with
>>> Mono.CSharp, and not Microsoft's CSharp. I haven't found any documentation
>>> on this specifically, but there are posts about interpreting C# at runtime
>>> via repl.
>>> Anyone have a small code example? I would prefer to not have to write
>>> the code to the file system if possible, Just pass a string of code and
>>> have it result in a byte array of the assembly that I can then write to the
>>> Thanks in advance for any thoughts!
>>> http://volatile-minds.blogspot.com -- blog
>>> http://www.volatileminds.net -- website
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
> http://volatile-minds.blogspot.com -- blog
> http://www.volatileminds.net -- website
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list