June 2004 Blog Posts

NGen Custom Actions using WiX – Part II: Type 34 actions

As I alluded to in my last wix blog entry if you want to provide any sort of location robust access to well known folders Type 50 CustomActions are not for you. I thought I could get away with this as we’re just using msi to deploy our bespoke app to the testing environments which we control. However my boss came to me this morning saying they had one machine on behaving in a pre-jited manor could I take a look; sure enough the windows folder on this machine was c:\winnt rather than...

NGen Custom Actions using WiX

I recently had to create an msi installer that ran ngen on each of the assemblies that I installed. I had a number of difficulties doing this, so I thought I share my findings here an hopefully save others a bit of time.   I won’t have been able to do this at all with out orca, an MSI decompiler supplied with the installer section of the platform SDK. Also looking at the definitions of the MSI tables helped a lot.   The CustomActions is a bit of a strange beastie, it has just 4 column, these...

Parser Library for F#

Dominic Cooney has create this parser library for F#.

Regular expression interpreter in F#

Domonic Cooney has published an interesting blog post on a regular expression interpreter in F#    

Danish customs 2

If you get married in Denmark the groom does not know when his stag (bachelor) party will be. His friends arrange to kidnap him some time before the big day and return him some time later, hopefully before the wedding.

Behaviour of SQL statement RaiseError with DataSets and IDataReaders

A developer at work queried me to why RaiseError generates an exception when working with a DataSet but not when working with an IDataReader. Here is a short code fragement that demonstrates the problem.   using System; using System.Data; using System.Data.SqlClient;   class TestRaiseError {       static void Main(string[] args)       {             SqlConnection connection = new SqlConnection("server=myServer;database=northwind;uid=sa;pwd=password");             SqlCommand command = new SqlCommand("select * from Employees RAISERROR ('raise an error', 16, 1)", connection);             IDataReader reader = null;             try             {                   connection.Open();                   reader = command.ExecuteReader();                   while (reader.Read())                   {                         Console.WriteLine(reader.GetString(1));                   }             }             finally             {                   if (reader != null)                   {                        ...

Danish customs

If you are not married by the you're 25 birthday you are given cinnamon. If you're still unmarried at 30 you get pepper.