app-requires-net-3.5-3.0-2.0If you are reading this page, chances are that you have been trying to run an application that is asking to have .NET 3.5 or older, going back to 2.0. The good news is that .NET 3.5 (what is .NET by the way?) can handle all prior .NET versions, so you only need to install it once. The bad news is that the installation will sometimes fail and while the problem is largely documented, the solutions are sparse and many don’t work. I have bumped into this problem myself with a fresh Windows installation, so I wanted to share how I got out of it. I’ll go through many possible fixes for this, from “easy”, to the more difficult one.

Fix 1: enable .NET 3.5 in the control panel

Open the Windows control panel, search for “Turn Windows features on or off” and click on that link. A dialog will open and you can see that .NET Framework 3.5 is unchecked. To add make it active, check it and click OK.

enable-net3.5-control-panel

In theory, Windows should download the necessary files from the web, install the framework, and that’s it. Congratulations, you can now run your app. Unfortunately, many users will encounter a dreaded error code 0x800F0906.

Fix 2: what is code 0x800F0906 and how to go around it

A number of errors associated with this particular error is documented in the official Windows support site. The error means that for some reason, Windows is not able to download the necessary files to install .NET 3.5.

This is a fairly generic error, and of course, the first thing that Microsoft says is “check your Internet connection” which is a fair question, but most likely, your Internet runs just fine, and this is how you got to this site.

The first thing that I tried was to download a 175MB full distribution of NET 3.5, but the installation failed as well, proving that this was not an Internet connectivity issue.

Since the download doesn’t work, the other solution is to install the framework from a local media, USB Disk or DVD ROM depending on what’s at hand. Most OEMs no longer ship discs with their computers, and most also don’t provide a Windows installation USB stick as well.

This is a big issue because you undoubtedly want to have access to a Windows install RIGHT NOW, and you basically have to either

  • Order a bootable OS media from the PC maker
  • Borrow one from a friend
  • Download a windows install ISO image and make a bootable USB installation disk. This is when having geeky friends come in handy.

Note that in order to build a bootable Windows installation disk from an ISO file, you need the Windows USB boot, which requires… you guessed it… .NET 3.5 (the official URL is down right now, but it may be temporary, here’s a backup on CNET downloads).

Alternatively, you may also be able to simply mount the ISO as a virtual drive and copy the files to a local disk or something like that. You don’t need to actually “boot” from it.

I had a Windows XP machine on hand, so I used that one to create my Windows 8 USB Boot. However, if you are not so lucky, there are several other Bootable USB utilities out there that claim to replace Microsoft’s own tool. I have NOT used any of them, so it is up to you to decide if you want to try.

Once you have the Windows installation files in a known place, you can use the DISM (Deployment Image Servicing and Management) utility to enable NET 3.5 for you. For that, you need to open a prompt command in Administrator mode by searching for “command prompt”, right click on the icon and choose “Run as administrator”. You can then run the following command:

Dism /online /enable-feature /featurename:NetFx3 /All /Source:F:\sources\sxs /LimitAccess

install-net35-dism

Note that in my case, my Windows installation files were on F: but this could be different on your system. Replace F: with the appropriate drive.

This procedure is documented officially at http://support.microsoft.com/kb/2734782, but I thought that it lacked context and explanations. If you are lucky, NET 3.5 should now be installed and you can run your app!

Unfortunately, I was not so lucky and I found myself facing a new error message: “Error 0x800f081f. The source files could not be found. Use the “source” option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077” (the page links to http://technet.microsoft.com/en-us/library/hh825020.aspx which is how to configure a Windows Repair Source). Ultimately, none of the information contained in these pages did help me get this thing off the ground.

install-net35-dism-error

Note that if you want to open the dism.log file, you may find yourself looking at a bit of text and a pile of garbage that look like Asian characters. This is because the text reader is not using the proper character encoding. I was able to read the log properly by opening the file in Word and hand-picking the UTF-8 encoding. The log didn’t provide any useful into to fix this, but at least I was able to discard it after that.

Another solution consisted in changing a group policy to download from an alternate location than Windows update. I tried, but it ultimately failed, so I’m not adding it here. If you want to try that, head to this Microsoft page that explains how to configure the group policy to solve this.

However, I did find a solution to my specific issue…

Fix 3: check if some Windows updates are conflicting with the installation process

I’ve browsed the web A LOT to fix this (so I’m hoping to save your precious time by compiling this) and I found a little video that claimed to fix this exact problem.

Interestingly, the video did NOT fix my problem (watch it if you are curious, it may work in your case), but in the comments, I found a little gem by French YouTube user Simon Vezina who says:

“If this video doesn’t work for you, try removing KB2966826 and KB2966828 from your installed updates and try to install .NET 3.5 again from Add & Remove Features normally”

This seemed odd, but Windows Updates can sometimes create problems, so I went to check if I had these updates by going to: Control Panel > Add/Remove programs>View Installed Updates. In the search box, I entered the KB2966826 and KB2966828, and sure enough, they were both there.

I click on each and selected “Uninstall”, and after they were gone, I went to try again what was described in Fix #1. This time, it worked! No reboot required

What happened?

I don’t know for sure why these updates were causing the problem, but in my case, they certainly did. What happens is that when you install a fresh Windows 8.x Windows, the OS wants to update you as fast as possible to the latest fixes etc. This is a good thing. However, because you do this BEFORE having installed NET 3.5, and because they conflict with the later installation, many people bump into this problem.

Fortunately, the fix is simple once you know what is is, and now that I know the solution, I can see that this was documented online in sites such as dslreports, superuser, or tomshardware. The problem is that a search for “How To Install .NET 3.5 On Windows 8” doesn’t really surface the immediate solution.

I hope that this page connected the dots and saved you some time. Enjoy your NET 3.x and 2.x apps and if you can’t get it to work, feel free to drop a message here, or if you know another solution, feel free to add a comment to help someone else. Thank you!

Filed in Computers. Read more about .