Computers and Internet

WinFX Runtime Component installation pain

The WinFX September CTP runtime components setup (i.e. the PDC05 release) has failed many times on my machine. This blog entry is aimed at softening the blow for anyone else suffering similar issues. It’s long and thoroughly uninteresting for anyone not suffering from The Pain. It contains a couple of links to some useful general tools for sorting out installation/uninstall problems.
The WinFX September CTP Runtim Components installation failures started after my first installation failed with an "event log full" error (seen only by attaching a debugger to the installer). After reconfiguring my event logs I re-ran the setup.
Now typically I get the unpacking files progress dialog and then the "Welcome to Setup" dialog. Shortly after clicking next I get a "WinFX Setup has encountered a problem during setup…" style modal. It seems to fail some time after installing the WinWF components, as when I attempt to re-install it moans that WinWF is already there. Either run the WinWF_3.0_x86.msi package ( or the following line to uninstall WinWF:
msiexec.exe /x {B644FB52-BB3D-4C43-80EC-57644210536A}
Even once this has been done, WinFX installation still fails on my machine. Looking at the temp file included in the error report it was intending to send to Microsoft (!) the last readable action it seems to have performed before encountering an error was "Begining Brooklyn Component Installation". I have no idea what this is (and nor do I by the end of this blog).
Examining the GAC I can see assemblies that look like they’re part of Indigo, indicating that setup was lying when it said it had removed all files that it had installed (I knew it was lying anyway, as I had to uninstall WinWF manually).
Tim Sneath’s blog ( mentions a JScript file to clean up old Avalon installs. This found many orphaned "installer component key[s]" in the registry. They all indeed looked like presentation related files. It deleted those keys from the registry and the equivalent files from %windir%\system32.
Rerun winfx setup…
The Avalon cleanup had no effect on the success of the install. Following the subsequent WinWF_3.0_x86.msi install and the WinWF uninstall, running the JScript file had no effect ("the system was already cleaned up").
Googling found the following Brad Adams blog: "Uninstall magic: MSIZap and MSIInv" ( In the comments someone points to an MS download that wraps a GUI around MSIZap called "Windows Install Cleanup":;en-us;290301
Running Windows Install Cleanup  tells me I have ‘Microsoft "Indigo" Beta 2 [8.0.50125.913]’ installed. This doesn’t show up in the Add Remove Programs list at all. Note that running this will only remove it from the Windows Installer database, not the underlying files. Indeed a quick check in the GAC shows that System.ServiceModel (2.0.50215.913) is still there.
Rerun winfx setup…
This time round about a dozen console windows flared into life and died back taking significally longer than usual, but the end result was a "… has encountered a problem during setup…" message again. The temp file again indicates the last thing it was trying to do was install the Brooklyn components. The next install the Windows Install Cleanup doesn’t see Indigo at all. However, I did find "Avalon September CTP…", so I removed that too.
Rerun winfx setup…
Success! Relief. And a celebratory glass of wine. Let’s hope I have even half the time I took installing this software to actually test it!
Wonder if Google will ever index this and save anyone else the pain?
Computers and Internet

Top pick from PDC05

I have returned from this year’s PDC, which was hosted in LA, and I’m more or less over the jet lag. For those of you into this sort of thing, I thought I’d share with you my top session at the conference. That session was "C#: Future Directions in Language Innovation". This session discusses some of the improvments in C# version 3 around writing relational queries directly in C#. This could be against XML data, or relational database data.
However, the really interesting stuff for me is not the fact that you can write the queries; it’s the advances in the language that allow for this querying to take place. I can’t find a transcript of the actual session right now, but Scott Wiltamouth‘s blog pointed out this video on Channel 9 (37 mins) that discusses the same issues. Also look at the C# 3.0 Specification.
So, those advances in the language; what are they?
1) Lamda functions – shorthand ways of defining predicates inline, utilising C# 2’s anonymous methods.
2) Extender methods – ways of syntactically adding methods to classes without owning the class code or deriving from it.
3) Type inference – use of the ‘var’ keyword where the explicit type of a variable isn’t given, it’s infered from the right hand side of the initialisation statement.
4) Anonymous types – mechanism for defining a type implicitly by etablishing its contents in line. e.g. "var p1 = new { Name = "Lawnmower", Price = 495.00 };"
Watch the video and do some Googling. There’s plenty of material about this out there. There are some critiques too (Dlinq issues, Lambda issues), the reading of which can often be more informative than the introduction to the technology itself.
A final note. This technology is C# version 3. C# version 2 isn’t even released yet. If you want to have some input into C#3 then now’s the time; don’t moan about it later!