Monday, January 7, 2008


When I started writing vbnc, there weren't many options when it came to deciding which library to use to write the assemblies, only System.Reflection.Emit (SRE) was a real option.

SRE is very powerful, but unfortunately it has a few known and unknown limitations, mostly because it was never designed to be used by a full-fledged compiler.

Since I heard about Cecil, I've wanted to switch, and for the last months I've slowly added support for emitting assemblies with Cecil. Yesterday I reached a very important milestone: vbnc is able to bootstrap itself when using Cecil!

And I have to say that Cecil is A LOT easier to use than SRE, especially with generics.

There are still some problems for switching right away to only using Cecil, one of the biggest being that it's quite slow if you have many referenced assemblies (since Cecil loads everything from an assembly when loading it), though there is work in progress here.

Hopefully these issues will be solved shortly, and I can finally remove everything SRE-related, which has caused me quite a few head-aches!

1 comment:

  1. I'm frustrated with ASP.Net 2.0 and VB.Net in the mono world. Are there sample 2 files to show how VB.Net works when used in or with aspx pages? Mono-develop still doesn't generate working ASP.Net VB templates for me.

    I cannot find examples or discussions showing how to make VB.Net aspx pages work with xsp2 (using Novell/Suse's 1.2.6 mono). It fails when trying to compile the the web pages alway fails. I use Visual Studio 2005 at work and can't seem to get the mono version working right on Linux.

    CECIL is a great idea. Have you considered giving vbnc an option to compile to Java byte code?