Lewis' Blog Tales from the trenches of information technology


Broken Windows updates for .NET

Download PDF

Ah, into the land of (broken) Windows we go...

I despise Windows. Have I said that before? Here, in case I haven't, I'll say it again. I despise Windows. That feels better. It's good to get such things off one's chest. What a hopelessly broken operating paradigm. Oh, well. It's gotten better, I guess. that is to say, it used to be even worse.

I've been spending much time of late working between zypper and yum on various flavors of Linux and now, eComStation, which has its own port of yum. Of the two, I prefer zypper, though either is head and shoulders beyond the inane Windows patching system. However, when in Rome...

I'll post more about how I got into this mess in the first place, but for now, suffice it to say that no good deed goes unpunished, and for all of us in IT, who regularly get hit up for favors from friends and family, this lesson in life is so oft repeated that we should just go screaming from the room whenever the subject is broached. And so it was that I ended up with a ThinkPad T30 running XP SP3 (or rather, limping along with XP SP3 in 768MB). Skipping the aforementioned and to which alluded details, and getting to the crux of tonight's post, I had to do a really crude restore on the system in order to regain booting ability. In the process (or perhaps before the problem occurred; I don't really know), the .NET stuff got all fouled up, and I was unable to install any updates.

Our friends in Redmond, or rather, Aaron Stebner, who works at Microsoft, provides a handy utility on his blog, the .NET Framework Cleanup Tool. This does a great job of uninstalling one or more versions of this disgusting mess, allowing one to (naturally, and per Microsoft's typical design philosophy) reinstall the entire mess again. Seeing as to the fact that I could neither update nor uninstall .NET framework 1.1, 2.0, 3.0, 3.5, nor 4.0 from this machine via the Windows Installer (and yes, I reinstalled version 4.5 of the Installer, for good measure), I figured I'd give Aaron's tool a spin. It did indeed work wonders, and removed the foul stench from the boot volume, whereupon I (again, true to form for Microsoft) rebooted the machine (one of these days, I'm going to actually tally how many reboots it takes to fully patch a Windows system).

I then started from the ground up, installing 1.1, then 3.5 SP1 (which, for some reason, includes 2.0 SP1 and 3.0 SP1 - but not 1.1), then 2.0 SP2, 3.0 SP2 (oops...that one didn't want to go in manually, so I held off - after trying a half dozen times), and then 4.0.

Next, I ran Windows Update (always an experience). There were 8 updates found to apply, including the aforementioned 3.0 SP2, and a few hotfixes to 3.5 SP1, as well as a few for 4.0, including KB2468871.

All applied (including the 3.0 SP2 which would not go in manually for me; perhaps there was a prerequisite installed with one of the other updates), except KB2468871. Confused

Reboot. Windows Update. 11 updates to install, including KB2468871.

All applied, except KB2468871. Angry

Reboot. Windows Update.14 updates to install, including KB2468871.

All applied, except KB2468871. Furious


Okay, into the wild we go (read: time for a Scroogle search).

I turned up this little gem, which directed me to check for the presence of System.Xml.Serialization.dll in C:\Windows\Microsoft.NET\Framework\v4.0.30319 (assuming "C:" is the boot volume, of course). Here's the fun part (read: chicken and egg): System.Xml.Serialization.dll apparently doesn't (always) get installed with the initial (or subsequently patched?) .NET 4 package, but it is included in NDP40-KB2468871-v2-x86.exe (attached to KB2468871, and yes, v2 is the later one; there is truly a v1 of this rollup package, though why they couldn't come up with a more unique name than "v2" I shall never know). The trick is to download the rollup package and start the installation, which will place System.Xml.Serialization.dll in C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System.Xml.Serialization\v4.0_4.0.0.0__b77a5c561934e089 . Hit with Brick From there, one has only to copy the dll to C:\Windows\Microsoft.NET\Framework\v4.0.30319 . The installation will fail, of course, before the copy is made, so it is necessary to re-run the installer once more to get to finally go through. Don't ask. The rollup package applied without a hitch.

Oh, and yes, I did try the Windows Installer Cleanup Utility, and a couple other hacks to try to get this stuff fixed, before resorting to the tried and true "Redmond" method of shooting the elephant.

Like I said: don't ask. Hopefully, this will help someone else.

Comments (5) Trackbacks (0)
  1. Lewis,

    First of all, thanks for a link to that tool. Something to keep in the back of my mind.

    If an XP machine is running slow with 786 megs of ram, its really the users fault unless their running something like an RDBMS, Visual Studio, AutoCAD, or something else  like that. Of course, the fact that a typical end user can and usually will turn windows into a bloated mess is a real problem.

    As far as not reinstalling windows from the get go, well I’ll just say two things. The first is that there is a fine line between bravery and stupidity. The second is I’m currently backing up my dads laptop to be wiped. Although this is the first OS reinstall since 2003 for this machine.

    In my experience, when installing a fresh system, just installing .NET 3.5 and all the service packs gave me all the .NET 2.0 and 3.0 service packs. Naturally,, the state of the machine you inherited was the cause of your issues. I can offer an explanation as to why .NET 3.5 also installs 2.0 and 3.0. Basically, .NET 2.0 was a change to the actual .NET VM (or JIT interperter or whatever it is). 3.0 and 3.5 just added new assemblies. To use a linux analogy, same kernel, but three distinct versions of libc, with each version of libc having additional APIs.

    Finally, if you want some sanity for third party package management on windows, look into chocolatey. Its a powershell package manager for windows executables based on nuget, which is a method for managing dll dependencies for Visual Studio packages. Windows has been getting a lot better in recent years, especially with powershell.

  2. Thanks for the tip concerning chocolatey; I’ll definitely check into it.

    There’s not a heck of a lot running on this machine aside from antivirus, and even disabling on-access scanning doesn’t seem to gain me much in terms of performance. The T30 takes a maximum of 1GB RAM, and obviously, there are shortcomings with the Pentium M (vs a Centrino, as I have in my T43), but the difference in performance from a virgin install of XP SP2, let’s say (not even SP3) and a fully patched XP install with IE 8 on it and all the .NET nonsense is staggering. Simply put, fully patched and modernized XP was not and is not meant to be run in less than a gig  (or two) of RAM, and this machine came from IBM with XP preloaded, and a minimum RAM complement of 128MB (no kidding!).

    My argument with an OS which practically *requires* an entire reinstall on a semi-regular basis is that there are plenty of OSes which do not follow this rule, thus, it’s not necessary. The OS does not police itself well enough to remove the cruft which it accumulates, and this, IMO, is a major design flaw.

    Your point about when to make the decision to reinstall vs repair is a good one, though, and well taken. In this case, it was as much about learning what went wrong as actually fixing the machine (or at least, it became so at some point). 😉

    I still hate Windows.


  3. I have no illusions of making you not hate windows, nor is that my intention.

    I actually refuse to run anti-virus on my personal machines, so that gives me a bit of a speed boost. Of course, that’s not a good idea for the unwashed masses. It only makes sense in my case because I’m religious about full system backups, and my code is stored in github and project locker. That and the fact that I know what I’m doing (famous last words).

    I will admit its been a while since I used a machine with less than a gig of memory. First gen netbooks are fine with XP SP3. Visual studio runs tolerably, but compiling C++ programs is slow. My netbook now runs ubuntu, because I realized the train is much better for blogging than .NET development, which is what keeps me on Windows. On that same note Windows 7 runs on my Wife Inspiron Minie 1012 pretty well. Windows 7 is much more CPU hungry than memory intensive. Its a pig on my pentium 4 with at least 2 gigs of memory, but give its a dual core atom and a gig of ram, and the only problem is none of the control panel windows display fully at that low resolution.

    My dads machine is a Dell with a centrino and 2 gigs of ram. I’ll try to give a rundown of what I install on it after I am done fixing it. I’m going to convert him from firefox to chrome. I’m not sure what antivirus to use for him. Unfortunately, I must give him iTunes since he has an iPhone,

  4. Your choice not to run AV on your own systems is one which you have consciously made, knowing and accepting the risks you take. Having the understanding and the knowledge to not open executable attachments, not use extremely unsecure (insecure?) applications vulnerable to known exploits, and to maintain a patch level which is at least within reason provides you with some modicum of defense.

    [Antivirus recommendations: In full disclosure, I am a Norman reseller, so if a commercial product is something you’re willing to consider for your dad, I would steer you in that direction. That said, I have some clients using AVG Free (though I’ve had some issues with it of late), and ClamWin is a good implementation of ClamAV on Windows (free of licensing costs and fairly easy on resources).]

    I agree that Win 7 seems to be hungrier for CPU cycles than for RAM. At least, that’s been my experience on client systems.

    I also know that your intention is not to sway my perception of the Windows operating system. 🙂 I don’t know; under the hood, much of it still reminds me of OS/2 1.0!


  5. Lewis,

    Just a quick epilogue. Norman looks good and I’ll keep it in mind if I ever need non-free anti-virus. AVG was good back in the day but its gone downhill. The word on the internet is that Microsoft’s security essentials was good enough, and its free and updated for XP. So I went with that and I couldn’t be happier.

    I ended up buying my dad a new laptop for Christmas and re purposing his old one for my in-laws, I stripped off the trial AV from the old one and put on MS Security Essentials for Windows 7. Needless to say I also uninstalled a lot of other pre-installed crap and installed chrome.and thunderbird.

Leave a comment

No trackbacks yet.