Orchard begins to work under Mono

by grendel 3. February 2011 10:32
After 4 days of work, the first Orchard screen rendered:

This is just a start as it's only the setup screen, but it's a major step forward and a sign that Mono supports MVC3/Razor well enough to run a pretty complex application Orchard is. Make no mistake - the simplicity of the screen is misleading. Behind the scenes we have a whole lot of dynamic objects created using DLR, lots of components built, assemblies loaded, files parsed and code generated. Note also that NO changes were needed to Orchard code in order to make this happen.

I have modifed the setup screen code a bit to show that it indeed runs on Mono :)

The next step is set up SQL and see what breaks next :). It's a good start though!

To test this yourself you will need:

  • Mono from the master branch (all the necessary fixes are ported to the mono-2-10 as well but I haven't really tested it with 2.10 so I can't certify it works there)
  • MonoDevelop from its master branch (xbuild will currently not work).
After the build is done make sure to remove the Orchard.Web/bin/Microsoft.Web.Infrastructure.dll assembly as Mono provides its own version. And remember that Orchard is a .NET 4.0 application - you need to use the following command to run it:
MONO_IOMAP=all xsp4


Mono | MVC | MVC3 | Orchard | Razor

Comments (6) -

2/3/2011 1:12:00 PM #

Fantastic news!
Thanks for your work!
What were the biggest areas you had to fix in mono?


2/3/2011 2:07:15 PM #

The fixes were actually very minor although time consuming to find. A few issues with the CSharp binder in mcs (fixed by <a href="mareksafar.blogspot.com/">Marek Safar</a>), IOMAP-related fixes in the runtime (case-insensitive configuration file lookup), reflection fix for correct binding of methods with param arrays, implementation of few missing 4.0 bits and some adjustments to the VirtualPathProvider in System.Web.


Andrew Tierney
Andrew Tierney
2/3/2011 4:49:36 PM #

Wow.. Great work.

I have a couple of questions if thats ok.

1) Do you need to grab the Razor DLL's from Microsoft's MVC runtime ?
   or is this all in the mono 2.10 master branch ?
   (ie. no need to grab microsoft mvc3 ???)

2) You mentioned:     MONO_IOMAP=all xsp4
   I assume this is an environment variable ? before you xsp4 ???

Again... Excellent news..

I have been looking forward to running orchard on mono...!!

Well done with the initial success... Looking forward to the SQL layer next Smile


2/3/2011 6:10:21 PM #

1) Orchard includes all the assemblies it needs to run. Mono doesn't have any of mvc3/razor/webpages integrated yet (only mvc3 is opensource and without razor etc sources it would be a crippled build)

2) Yes, MONO_IOMAP is an environment variable (see the mono(1) manpage for more info) and putting it before xsp4 sets the variable in the environment of that process only


4/19/2011 4:44:57 AM #

Hello Marek,
I like the progress you made with orchard.
Are there any news?
Are you currently working on it?
Orchard 1.1 is out now - did the orchard team accept your changes?

Best regards,


4/19/2011 5:06:42 AM #

The patches aren't in the main Orchard repository yet (nor they are part of the release). They will be contained in the default-mono/integration-mono branches at some point.


Add comment

  Country flag

  • Comment
  • Preview


Comment RSS