Microsoft, it would appear, its appetite whetted by Sharepoint, and on the search for its CMS Shangri-La, has been dreaming of a 'Shumbraco'. Since its discovery of Umbraco, Microsoft has been increasingly pouring resources and know-how into Umbraco, and the latest Umbraco 5.0 CTP 1 candidate reflects this.
What does this mean for the community's attempts for getting Umbraco to run on Linux? On the one hand, it does not make sense for Microsoft to give its new darling CMS too much free reign - lest it escape towards another more handsome suitor... On the other, one can imagine that, much as there is a Carbon Credit system, perhaps there could be a competition credit system, through which, for example, supporting Umbraco on Linux may lead to lower fines from the European Competition Commission.
Commercial politics and strategy aside, how does the red hot 5.0 CTP 1 version fare in Linux? To this end, I ran a few tests, the results of which I would like to share here.
For my evaluation, I used an Arch Linux, which is easy to set-up and has quick and easy access to the latest mono build, 2.10.
Machine Configuration: You ll need the latest mono, and a mysql service running. If you are going to try to compile the 5.0 CTP source in Linux, you will also need monodevelop. The xsp4 web server will be enough. It is easy to set up Arch Linux in a VM of your choice. The one good thing about Arch Linux is that, unlike Ubuntu, from a developer's perspective, it is very easy to work with.
To get the latest version of mono you will need to use the 'extra' repository:
#> nano -w /etc/pacman.conf - activate everything except test builds here
#> pacman -Syu
Mono installation: #mce_temp_url#
CTP 5.0 Installation: SImply get it from Codeplex and install the binaries (optional - and the source) in your chosen directory. Navigate to the application directory, and to run the app do:
#> xsp4
This should get you up and running on localhost:8080. OF COURSE, you will immediately be greeted by a YSOD.
Yes, mono 2.10 does not implement MVC 3. We will need to get some dlls.
YSOD 1 - Missing System.Web.Helpers -
YSOD 2 - Missing System.Web.Mvc -
YSOD 3 - Missing System.Web.WebPages -
YSOD 4 - 'Argument Cannot be null...' - Needs: System.Web.Routing, System.Web.Razor, System.Web.WebPages.Razor
For testing purposes, you can get all of these from the GAC of a Windows machine (C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\) using the v4 directories, and install them in the bin directory of the umbraco app.
This takes us to the next and final YSOD:
YSOD 5 - '/tmp/xxx-temp-aspnet-0/b6ebba59/82a81801/Umbraco.Cms.Web.Editors.dll does not exist'
YSOD 5 originates from the difference in which mono and Windows process and store shadowCopyPlug directories. I think this has to do with the new Umbraco plugin architecture and the security demands it poses. I could not get the mono system to run in Medium trust - even with changes in the master web.config in /etc/mono/4.0, it wanted to use FullTrust. In any case, this is a moot point as the difference in 'caching' directory structure is fatal.
What can be done? The Umbraco 5.0 CTP 1 PluginManager code could be re-written to take this difference into account. I had a small go trying to re-compile the Umbraco 5.0 CTP 1 source in monodevelop. But the mono C# compiler complains about some missing methods. This is the same error that used to plague the linux 'MVC Contrib' project. They had reportedly fixed this issue. However, when I tried compiling their MVC 3 Contrib code, I got the exact same error.
Error CS0584: Internal compiler error: Method not found: 'System.Web.Mvc.TagBuilderExtensions.ToMvcHtmlString'. (CS0584)
In umbraco 5.0 CTP 1, we also get:
DictionaryExtensions.cs(85,85): Error CS0411: The type arguments for method `System.Linq.Enumerable.SelectMany<TSource,TResult>(this System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,System.Collections.Generic.IEnumerable<TResult>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly (CS0411) (Umbraco.Foundation)
I am not sure if this is a consequence of the first error, or due to differences in C# compiler implementations.
Well, this brings us to the end of this exploratory article. In a nutshell at present we cannot get the red hot 5.0 CTP 1 running on Linux - but I hope that this article has pointed to a few next steps that the community can work on.