AOP Goes .NET Workshop

Posted by jbevain Sat, 22 Oct 2005 13:08:11 GMT


I’ll be there

If you are around between Nov 12-16 and want to talk about AspectDNG and/or Mono.Cecil, drop me a mail !

Cecil is slang for cocaine 7

Posted by jbevain Sun, 28 Aug 2005 23:48:26 GMT


Everybody’s round tripping, ‘tripping assemblies

Some very exciting progress have been made today. Let me explain in what I’ve spend the lasts minutes:

  • I have compiled Cecil HEAD normally, this produces a Mono.Cecil.dll file.
  • I have compiled this little piece of code referencing the previous assembly:
<span class="kwrd">using</span> System;

<span class="kwrd">using</span> Mono.Cecil;

<span class="kwrd">class</span> Test {

    <span class="kwrd">static</span> <span class="kwrd">void</span> Main ()
    {
        RoundTripCecil ();
    }

    <span class="kwrd">static</span> <span class="kwrd">void</span> RoundTripCecil ()
    {
        Console.WriteLine (<span class="str">"Round Trip Cecil"</span>);
        IAssemblyDefinition asm = AssemblyFactory.GetAssembly (
            <span class="str">"Mono.Cecil.dll"</span>);

        Console.WriteLine (<span class="str">"Cecil is loaded"</span>);

        AssemblyFactory.SaveAssembly (asm, <span class="str">"Mono.Cecil.dll"</span>, AssemblyKind.Dll);

        Console.WriteLine (<span class="str">"Cecil is written back"</span>);
    }
}
  • I’ve runned it, the result is a fresh new round tripped Mono.Cecil.dll
  • I’ve modified the previous code to round trip mcs, our C# compiler (if you still follow me, we are here using a round tripped Cecil to round trip mcs)
  • I’ve re-compiled Cecil using the fresh new mcs
  • And the new Cecil is perfectly working, wow.

The conclusion of all of that is that the writing layer of Cecil is more and more mature and stable. Few things are missing, especially multiple modules assemblies, but who uses that, and complex custom attributes, using arrays, or properties and fields.

Also the new API is in the SVN, it is now much easier for users to modify and create assemblies. Previous code samples on this blog are now deprecated, maybe I should remove them. Or update them. I will see. If you are already using Cecil, you fool, you may encounter one or two little API break with SVN head. The first that comes to my mind is the method of the AssemblyFactory to get an assembly, wich used to take a string and an LoadingType enumeration. This enumeration does not exists anymore, as I decided to get rid of two different engines to load assemblies. The LazyLoading was introducing a lot of complexity, so for the sake of simplicity, I’ve removed it.

Few things are still not implemented in the modifying layer, but I prefer focusing on the writing one before the end of Google’s Summer of Code. Some times after the end of the SoC, I will release the first public version of Cecil. Wich means API freeze, bugs reports, blah.

Sadly, Cecil itself can’t be use to make some nice screen shot. I had to find other ways:

Xml Indent 6

Posted by jbevain Wed, 24 Aug 2005 18:21:37 GMT


A friend asked me this morning how he could simply indent an XML file. You know, I’m a software programmer, I can afford to deal with such complicated problems, so I’ve written a fully managed Xml Pretty Printer. Of course it’s Open Source, and freely downloadable here:

All thanks goes to the authors of System.Xml :)

Pomme d'éther

Posted by jbevain Tue, 23 Aug 2005 12:51:00 GMT


Moi, hier:

Mac OS X86, c’est donner du ./configure aux cochons !

Older posts: 1 ... 24 25 26 27 28 ... 34