Tuesday, 22 October 2013

web.config name casing issue fixed

OK, after some teething pains, the new box is up and running, and I have fixed the web.config casing issue - the one where Umbraco was expecting a lower cased name, however, where mono would accept web.config or Web.config.

Of course, this issue would never have hit file systems that are case insensitive (e.g. default windows installations). But in our case, it created issues: when the web configuration file was called 'Web.config', Umbraco has difficulty finding it, and also re-generated 'web'.config' files in the Views folder.

So I wrote some code so that if we do not find 'web.config', we look for 'Web.config', and then if that is not found as well, we either re-generate, or throw an error.

On another note, on the new box, I could not get the monodevelop NUnit plugin to work. It runs for exactly 170 tests and then the UI crashes. I suspect a glibc compatibility issue. But to stay on track, I ll ignore this for the time being. I was able to run tests with the NUnit 2.6.3 gui application.

Sunday, 13 October 2013

New Linux box is up

Yes, the new Linux box is finally up and I have set up the parallel mono development environment as well for mono 3.0.11. I am ready to sort out the casing issue that affected the web.config file.

Setting up the new system required that I re-set up NuGet. I do not think I have discussed this before. This is discussed in detail here. To briefly summarise (assuming /opt/mono as install location),

$ mkdir /opt/mono/local
$ mkdir /opt/mono/local/bin
$ mkdir /opt/mono/local/bin/NuGet
$ cd /opt/mono/local/bin/NuGet
$ wget http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=nuget&DownloadId=741331&FileTime=130256444329670000&Build=20798
$ cd /opt/mono/bin

$ nano -w nuget

(add the below and save)
exec mono --runtime=v4.0.30319 --gc=sgen /opt/mono/local/bin/NuGet/NuGet.exe "$@"

There is also a really bizarre issue with the Monodevelop parser, and it can get confused parsing .aspx files. The quick hacky solution is to add a variable (control) declaration to the designer.cs file:

src/Umbraco.Web.UI/install/steps/Skinning/loadStarterKitDesigns.ascx.designer.cs View file @ 102a3fe
@@ -2,5 +2,6 @@

public partial class LoadStarterKitDesigns {
+ protected global::System.Web.UI.WebControls.Panel pl_CustomizeSkin;

(based on)
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="LoadStarterKitDesigns.ascx.cs" Inherits="Umbraco.Web.UI.Install.Steps.Skinning.LoadStarterKitDesigns" %>
<%@ Import Namespace="umbraco.cms.businesslogic.packager.repositories" %>

<asp:PlaceHolder ID="pl_loadStarterKitDesigns" runat="server">
<asp:Panel id="pl_CustomizeSkin" runat="server" Visible="false">

That's it for now.