Paint.NET v3.5.5 and .NET v4 woes

image The transition to .NET v4 with Paint.NET v3.5.5 has not gone as smoothly as I expected. Right after I released the beta, I immediately started receiving reports of installation problems. Now, before I go into more details, I would like to assure everyone that nothing bad was actually happening. Systems weren’t corrupted, there was no data loss, etc. These weren’t even installation failures, per se; things just weren’t connected seamlessly like they were supposed to be. Clearly it wasn’t ready for prime time.

No, the problem was much more subtle than that and sadly didn’t show up in any of my testing. The reports were along the lines of, “.NET 4 installed and then Paint.NET didn’t do its own update.” If you then tried to run the Paint.NET installer again, nothing would happen: the extractor would run, you’d get a beep, and then nothing. After a reboot, however, you could then run the installer and everything would work great.

As it turns out, on Vista and Win7, .NET 4 first requires an update to some OS components (which it installs automatically). This update, like all other OS updates (e.g., via Windows Update), will not install if a reboot is already pending from another OS update. After that, .NET 4 can install itself. Then the final kicker is that you can’t run a .NET 4-based application until after another reboot. On “Patch Tuesday” it would be very common that TWO reboots would be needed. My installer simply can’t survive across a reboot, nor do I have a desire to implement the code to enable this. I certainly can’t add this code within the timeframe of a 0.0.1 update.

As Liz Lemon on 30 Rock would say, “Nerds!”

image

Let’s just go ahead and get it out of our systems: blah blah blah, reboots suck, what’re those Micro$oft morons* thinking, blah blah blah, Lunix wouldn’t do that because of course it’s perfect, blah blah blah. Now, let’s go back to being adults and just accept that this is the way it works, for better or worse. Please don’t spam the comments box with tirades about reboots. I don’t know why an OS update is necessary, but I sincerely doubt the .NET folks would have done this without a really good reason.

Anyway. This wasn’t the case for .NET 3.5 SP1: even if its installer reported that a reboot was necessary, it was still possible to run the Paint.NET setup wizard (which is a .NET 3.5 SP1 app) and defer the reboot until after everything was completed. More often than not, a reboot was not needed. I think I’ve only seen a reboot needed when installing on XP, mostly when Windows Installer 3.1 also had to be installed.

So, here’s the new plan for Paint.NET v3.5.5. It will not require .NET 4. It will still be based on .NET 3.5 SP1, but with a few important changes to pave the way for a hard dependency on .NET 4. If Paint.NET detects that a reboot is pending from a system update, then it will not auto-check for updates (clicking on Check for Updates will still work as normal). This will help to avoid the confusion when .NET 4 requires a reboot before it can install. I never implemented this before simply because it wasn’t necessary.

I still want to avoid end-user confusion related to .NET’s side-by-side nature. Unlike conventional wisdom might assume, .NET 4 does not include .NET 3.5 SP1 (or 3.0, 2.0, 1.1, and 1.0), which means many people would have installed .NET 4, uninstalled .NET 3.5 SP1 (why would you need it if you have the newer version, after all?), and then hit an error from Paint.NET saying that .NET 3.5 SP1 was required. This is exactly the same problem we had when .NET 2.0 came out and Paint.NET v2.5 still required you to install .NET 1.1. Back then I got more than a few grumpy and indignant e-mails and forum posts from people and calling me bad names because of this. It didn’t even matter that Paint.NET v2.6 was a few weeks away from release at the time.

In order to avoid this confusion, Paint.NET v3.5.5 will support running on a system which has .NET 4 but not .NET 3.5 SP1 installed. However, if both of them are installed then Paint.NET will use .NET 3.5 SP1. This keeps things much simpler for myself and, especially, for plugin authors. If you really do want to run Paint.NET v3.5.5 on top of .NET 4 (and let’s face it, we all want the latest shiny stuff), that will still be possible with a minor tweak to the PaintDotNet.exe.config file: just swap the order of the <supportedRuntime> elements so that the .NET 4 one comes first.

Paint.NET v3.5.5 will still be dropping support for XP SP2 and Vista RTM (pre-SP1). I was planning to do this anyway, as it’s an important stepping stone to phasing out XP support entirely for Paint.NET v4.0. It also helps to shrink the download size by about 700 KB because now I don’t have to include Windows Installer 3.1. Less bandwidth and more simplicity lets me focus on other things that are way cooler.

Going forward, have no fear. It will still be possible for Paint.NET to install .NET 4, then itself, and then not require a reboot until the very end. This involves finessing my setup wizard to target .NET 2.0, something you can always rely on nowadays. Which really isn’t as bad as it sounds; none of my planned changes require anything more than .NET 2.0 and I’d just have to rework some places where I use LINQ or whatever. The setup wizard uses some of the other Paint.NET DLLs but I can just inline that functionality. I’m certainly not rewriting my setup wizard to use WPF or TPL. It’s just something that can’t be done without more code churn and a longer beta testing period.

Expect to see a new beta release shortly.

* I work for Microsoft too, by the way.

Advertisements

14 thoughts on “Paint.NET v3.5.5 and .NET v4 woes

  1. BlueRaja says:

    “Paint.NET v3.5.5 will support running on a system which has .NET 4 but not .NET 3.5 SP1 installed.”
    Whoa, how is that possible? Do you include a separate binary/dll for each runtime, or is there some trick to make binaries forwards compatible?

    • Bob says:

      Consecutive .NET versions don’t include major changes in the programming language and API, sure they add a little bit of this and deprecate a little bit of that, but if one doesn’t use any of these changed things, the same exact code can run on .NET 3.5 and .NET 4.0.
      However, one needs to tell the compiler to compile the code using this or that version, thankfully .NET allows one to target multiple versions.
      (hoping I didn’t write any outstanding error in this comment)

  2. ToadyRhyno says:

    Rick, keep up all the good work!
    Props for you, since Paint.Net v2 and up…I’ve successfully installed all the different versions without a single problem, including betas and pre-betas.
    Never had a single installation problem…on XP, Vista, or 7.
    Again, keep it up.

  3. Ray says:

    Omg, you work for microsoft? Wow! so you’re taking on 2 projects at the same time? Btw, nice work on the paint.net, can’t wait for v4.0!

  4. Andrew says:

    I check your blog once a month or so. Noticed the redesign now.

    What’s up with the 720px × 180px 215.91 KB image at top of blog? That’s quite big (in area and filesize).

    Guess I could adblock it. But anyone on a smaller resolution computer (netbook) wouldn’t see much at first glance.

    • Rick Brewster says:

      Oh you’re right on the header … I just uploaded a JPG version that’s 1/4th the size. I guess I never got around to doing that after I set up the new blog. (I had to migrate my blog since my original provider cancelled their “free” WordPress hosting.)

      The image itself is cropped from the latest screenshot I use on the main Paint.NET website, http://www.getpaint.net/

  5. Dan Dar3 says:

    hey Rick,

    Keep up the good work!

    Got I hate those b&£$^”£s, they get your hard work for free and they still bitch about it big time! They probably imagine is something they could’ve done the “right” way, but just couldn’t be bothered…

  6. Jonas says:

    @anon, I would’ve replied to your question detail, but as Rick has pointed out, this isn’t the right place for that. But in short, the “features” (or old technologies) of XP have been replaced with far better and improved features in Vista/7.

  7. Dylan says:

    I just want to say thank you for a great app. It has become indispensable for me.

Comments are closed.