Windows 8 installs with .NET 4.5. A default installation of Windows 8 doesn't seem to include .NET 3.0 or 3.5, although .NET 2.0 does seem to be available by default (presumably because Windows has app dependencies on that). I ran into some pretty nasty compatibility issues regarding .NET 3.5 which I'll describe in this post.
I'll preface this by saying that depending on how you install Windows 8 you may not run into these issues. In fact, it's probably a special case, but one that might be common with developer folks reading my blog. Specifically it's the install order that screwed things up for me - installing Visual Studio before explicitly installing .NET 3.5 from Windows Features - in particular. If you install Visual Studio 2010 I highly recommend you install .NET 3.5 from Windows features BEFORE you install Visual Studio 2010 and save yourself the trouble I went through.
So when I installed Windows 8, and then looked at the Windows Features to install after the fact in the Windows Feature dialog, I thought - .NET 3.5 - who needs it. I'd be happy to not have to install .NET 3.5, but unfortunately I found out quite a while after initial installation that one of my applications/tools (DevExpress's awesome CodeRush) depends on it and won't install without it.
Enabling .NET 3.5 in Windows 8
If you want to run .NET 3.5 on Windows 8, don't download an installer - those installers don't work on Windows 8, and you don't need to do this because you can use the Windows Features dialog to enable .NET 3.5:
And that *should* do the trick. If you do this before you install other apps that require .NET 3.5 and install a non-SP1 one version of it, you are going to have no problems.
Unfortunately for me, even after I've installed the above, when I run the CodeRush installer I still get this lovely dialog:
Now I double checked to see if .NET 3.5 is installed - it is, both for 32 bit and 64 bit. I went as far as creating a small .NET Console app and running it to verify that it actually runs. And it does…
So naturally I thought the CodeRush installer is a little whacky.
After some back and forth Alex Skorkin on Twitter pointed me in the right direction: He asked me to look in the registry for exact info on which version of .NET 3.5 is installed here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
where I found that .NET 3.5 SP1 was installed. This is the 64 bit key which looks all correct.
However, when I looked under the 32 bit node I found:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\NET Framework Setup\NDP\v3.5
Notice that the service pack number is set to 0, rather than 1 (which it was for the 64 bit install), which is what the installer requires.
So to summarize: the 64 bit version is installed with SP1, the 32 bit version is not. Uhm, Ok… thanks for that!
Easy to fix, you say - just install SP1. Nope, not so easy because the standalone installer doesn't work on Windows 8. I can't get either .NET 3.5 installer or the SP 1 installer to even launch. They simply start and hang (or exit immediately) without messages.
I also tried to get Windows to update .NET 3.5 by checking for Windows Updates, which should pick up on the dated version of .NET 3.5 and pull down SP1, but that's also no go. Check for Updates doesn't bring down any updates for me yet. I'm sure at some random point in the future Windows will deem it necessary to update .NET 3.5 to SP1, but at this point it's not letting me coerce it to do it explicitly.
How did this happen
I'm not sure exactly whether this is the cause and effect, but I suspect the story goes like this:
- Installed Windows 8 without support for .NET 3.5
- Installed Visual Studio 2010 which installs .NET 3.5 (no SP)
I now had .NET 3.5 installed but without SP1. I then:
- Tried to install CodeRush - Error: .NET 3.5 SP1 required
- Enabled .NET 3.5 in Windows Features
I figured enabling the .NET 3.5 Windows Features would do the trick. But still no go.
Now I suspect Visual Studio installed the 32 bit version of .NET 3.5 on my machine and Windows Features detected the previous install and didn't reinstall it. This left the 32 bit install at least with no SP1 installed.
How to Fix it
My final solution was to completely uninstall .NET 3.5 *and* to reboot:
- Go to Windows Features
- Uncheck the .NET Framework 3.5
- Restart Windows
- Go to Windows Features
- Check .NET Framework 3.5
and voila, I now have a proper installation of .NET 3.5.
I tried this before but without the reboot step in between which did not work. Make sure you reboot between uninstalling and reinstalling .NET 3.5!
The above fixed me right up, but in looking for a solution it seems that a lot of people are also having problems with .NET 3.5 installing properly from the Windows Features dialog. The problem there is that the feature wasn't properly loading from the installer disks or not downloading the proper components for updates.
It turns out you can explicitly install Windows features using the DISM tool in Windows.
dism.exe /online /enable-feature /featurename:NetFX3 /Source:f:\sources\sxs
You can try this without the /Source flag first - which uses the hidden Windows installer files if you kept those. Otherwise insert the DVD or ISO and point at the path \sources\sxs path where the installer lives.
This also gives you a little more information if something does go wrong.
Other Posts you might also like