Running WiX on Windows Server 2008

Thursday, 18 September 2008

Our CruiseControl.NET build server is running Windows 2008. Today I added a WiX project to generate an MSI for one of the projects. This ran fine on my local machine.

I followed the instructions from the WiX 3.0 help file on “Integrating WiX Projects Into Daily Builds” with one exception - Step 2 adds a new section to the .wixproj file, but I had to remove the $(WixToolPath) prefix from the WixTasksPath element. eg.


I then checked this in and watched the build die with the following error:

light.exe (,): errorLGHT0217: Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".

Others have had similar problems, and the solution seems to be to make sure that the account the build process runs as is a member of the local Administrators group.

Deleting the “Program Files” directory

Wednesday, 10 September 2008

No, don’t worry I’m not that crazy. On the HTPC, I initially installed Vista on the 1Tb disk. When the replacement system drive arrived, I then installed Vista on that drive, but didn’t reformat the original disk as I’d already recorded some programmes that I wanted to keep.

This meant that there was the old “Program Files”, “Windows” and other directories that Windows creates. The problem is that even running with UAC you can’t delete them. If I’d reformatted the drive, I would have never had this problem.

Tim Sneath went through a similar situation, and his solution worked for me too.

A new toy

Tuesday, 9 September 2008

When I left UniSA earlier in the year, one of the parting gifts I received was a gift voucher, and I’ve finally decided what to do with it. I bought an iPod Shuffle.

I’d been pining the loss of my trusty HTC TyTN II phone, which doubled as an MP3 player, but couldn’t justify the price to keep it. I decided all I wanted was a basic player – nothing too fancy, and the Shuffle seemed to fit the bill, whilst still having the slick Apple look. As long as I could listen to a few podcasts I'd be happy (.NET Rocks! and Hanselminutes for starters)

ipod shuffle RED

I priced the 1Gb Shuffle in some local stores at $AU64. Apple sell it online for $AU65, plus they let you engrave it with custom text. I liked that idea, so if you ever come across a Shuffle that looks like the one above, it’s probably mine and could I have it back :-)

It’s not the first purchase I’ve made from Apple - that would be a Newton MessagePad 2000 I bought many years ago (and many years ahead of its time), but I think this is just as nifty.

You might also notice it is red – that’s because part proceeds of (PRODUCT)RED™ iPods are donated to fight AIDS in Africa.

Cutting remarks

Monday, 8 September 2008

When I’m not cutting code, I cut trees :-)

David chainsawing a tree

It was a fine day on Saturday, so I hired a chainsaw finished up the job that a big storm started last year.

Two-thirds of our Manchurian pear tree was blown over (conveniently missing the roses and the other tree you can see on the left). At the time, a friend Craig (also a code-cutter by the way) came over to help clean up the mess. We left all the branches in a big pile, and that, along with the remaining trunk was chopped up on the weekend.

And it is true to paraphrase the old saying - when you have a chainsaw, everything looks like potential firewood.

Sunday was Father’s day, and rather than breakfast in bed, the kids decided not to wake us up early for a change – much appreciated – especially as I was feeling a bit sore from lugging the chainsaw around the day before (keyboard work doesn’t seem to give you as big arm muscles as you might think!).

Installing CruiseControl.NET on Windows Server 2008

Wednesday, 27 August 2008

We’ve been running CCNet on a very old workstation, and the build times were starting to get rather long. To fix this, we’ve had a new Windows Server 2008 virtual machine provisioned.

These are roughly the steps I followed to get things up and running:

  1. Enabled IIS 7, WPAS and SMTP
  2. Installed .NET 3.5 SP1
  3. Installed CruiseControl.NET 1.4
  4. Updated web.config to allow webdashboard to run in integrated mode by adding the following section:
        <add name="*.xml_*" path="*.xml" verb="*" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard" preCondition="integratedMode,runtimeVersionv2.0" /> 
        <add name="*.aspx_*" path="*.aspx" verb="*" type="ThoughtWorks.CruiseControl.WebDashboard.MVC.ASPNET.HttpHandler,ThoughtWorks.CruiseControl.WebDashboard" preCondition="integratedMode,runtimeVersionv2.0" /> 
    <requestFiltering allowDoubleEscaping="true" /> 

  1. Installed applications required for building and testing:
    • CollabNet SVN 1.5.1
    • TortoiseSVN 1.5.1
    • Gallio
    • FxCop 1.36
    • Sandcastle
    • Sandcastle Help File Builder
    • Windows SDK for Server 2008 (just dev tools)
    • Report Viewer 2008 SP1
    • SQL Server Express 2008
    • Change CCService to run as Automatic and as specific ‘build’ user.
    • Grant ‘Modify’ access to ‘build’ user to ‘C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files’.

One issue I did find right at the end – one of our tests was failing with this unusual error:

System.Windows.Markup.XamlParseException: 'DockPanel' object cannot be added to 'Viewbox'. Exception has been thrown by the target of an invocation. Error at object 'System.Windows.Controls.DockPanel' in markup file 'AbbGrain.Aom.Client;component/shell.xaml'. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80070018): The program issued a command but the command length is incorrect. (Exception from HRESULT: 0x80070018)
at MS.Internal.HRESULT.Check(Int32 hr)
at System.Windows.Media.MediaSystem.Startup(MediaContext mc)
at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
at System.Windows.Media.Visual.VerifyAPIReadWrite()
at System.Windows.Media.Visual.VerifyAPIReadWrite(DependencyObject value)
at System.Windows.Media.VisualCollection.VerifyAPIReadWrite(Visual other)
at System.Windows.Media.VisualCollection.Add(Visual visual)
at System.Windows.Controls.Viewbox.set_InternalChild(UIElement value)
at System.Windows.Controls.Viewbox.set_Child(UIElement value)

All the more strange, as the test was passing on the old build server and also passed on all our workstations. Turns out it’s a bug in .NET 3.5 SP1.

There’s a comment at the bottom of the bug that changing the service to run in XP SP2 compatibility mode should work around the issue. This didn’t work for me initially, until I realised I needed to click on the ‘Show settings for all users’ and then set compatibility for all users. eg.

Compatibility for all users dialog

Restarting the service then saw the WPF test pass.