Mono and the Compact Framework in Love, Part Two 1

Posted by jbevain Fri, 31 Mar 2006 00:03:14 GMT


Few hours ago, I’ve discovered that in order to allow assemblies compiled on Mono to run over the Compact Framework, we needed to patch the assemblies so they use the public key of the Compact Framework instead of them of the .net framework.

First, I’ve written a patcher that changes in the raw image the references it founds. This solution was somewhat suboptimal because the .net framework uses two public keys, while the Compact Framework use only one.

So I had to write a more complex patcher. This new patcher is using Cecil (it requires a fresh SVN Head to compile), and map every known reference it can to its Compact Framework equivalent. It could be further modified to transform the assembly when needed. For instance, the System.Windows.Forms.DataGrid class is hosted in its own assembly on the Compact Framework. This patcher could create the reference when needed and make the DataGrid points to it.

Yet, I’m not sure it is worth the big effort to create a good patcher.

Trackbacks

Use the following link to trackback from your own site:
http://evain.net/blog/articles/trackback/59

Comments

Leave a response

  1. Avatar
    debackerl Fri, 31 Mar 2006 08:26:23 GMT

    What are those two public keys? I could only think about the public key used to verify the signature of the assembly.