Tuesday 16 September 2008

Windowless ActiveX controls are not supported

I recently started to see this intriguing exception message from a WinForm application that we write. After much googling, I came across a number of other blog entries suggesting a wide range of issues, none of which helped much. This is code that has worked for years, but had suddenly ceased to do so!

In the end it turns out that the underlying ActiveX dll had become unregistered on the system, so it was failing the COM initialisation process. An interestingly obscure error message for this condition, but a quick regsvr32 call later and it all worked again!


Certified ScrumMaster

I have just completed my Certified ScrumMaster training, provided by Danube, in London. An excellent course taught actually using Scrum as the delivery technique, a very efficient way of learning, i.e. by doing!

Now looking forward to rolling Scrum out to my team at work and seeing how we improve quality and productivity at the same time!


Wednesday 10 September 2008

CS1504 & MSBuild

I have just spent half a day trying to reason why VS2008 is happy to build a solution in a particular configuration, but MSBuild 2008 is not prepared to build exactly the same solution in the same configuration!

First a bit of background, we use a AssemblyInfoCommon.cs file to contain all of the common bits of the assembly information, such as copyright, dates, build numbers etc. This is included into each of our C# projects as a link. It then appears in the VS Solution Explorer and all is well.

When I was getting this strange error code of CS1504 and complaining of not being able to find the common file in the project folder, I was a little bemused because the file doesn't live there, but in the parent folder. After much faffing, I discovered that the project file had been hand edited (always a warning sign) and the link to ..\AssemblyInfoCommon.cs was actually ../AssemblyInfoCommon.cs. The incorrect /, rather than \, was the culprit, looks like MSBuild cannot handle it and bails, where as VS2008 just ignores it, so in this case it didn't appear in the solution explorer!