Contact   •   Products   •   Search

Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs

.NET 3.5 Installation Problems in Windows 8


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:

WindowsFeatures

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:

DotNet35NotInstalled

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

RegEdit

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:

  1. Installed Windows 8 without support for .NET 3.5
  2. Installed Visual Studio 2010 which installs .NET 3.5 (no SP)

I now had .NET 3.5 installed but without SP1. I then:

  1. Tried to install CodeRush - Error: .NET 3.5 SP1 required
  2. 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:

  1. Go to Windows Features
  2. Uncheck the .NET Framework 3.5
  3. Restart Windows
  4. Go to Windows Features
  5. 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!

More Problems

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.

Make Donation
Posted in Windows  .NET  


Feedback for this Post

 
# re: .NET 3.5 Installation Problems in Windows 8
by Marco August 28, 2012 @ 2:00am
I don't have this problem until now. But I cannot access the Windows Features dialog, it always asks me to enter or buy a product key on both machines. One machine is running Windows 8 Pro 32 Bit German, the other one Windows 8 Pro 64 Bit English. Both with valid Dreamspark Premium licenses. Entering the product key used during installation does not work here. Are there any limitation with the Dreamspark Premium licenses?
# re: .NET 3.5 Installation Problems in Windows 8
by Lex Li August 28, 2012 @ 10:07pm
I don't think Visual Studio 2010 installs .NET Framework 3.5. It ships with .NET Framework 4.
# re: .NET 3.5 Installation Problems in Windows 8
by Rick Strahl August 30, 2012 @ 3:20pm
@Lex - *VS 2010* does install .NET 3.5 (and 4). VS 2012 installs .NET 4.5.
# re: .NET 3.5 Installation Problems in Windows 8
by Duke October 11, 2012 @ 8:46am
Rick,

I tried your solution and checked registry after un- and re-install asp.net 3.5. I found the SP on 32 bit sets to 1. However, on IIS 8's Application Pool, still can't see the .NET 3.5. I tried to install asp.net manually but it seems the installation .exe does not work at all.

Thanks,
Duke
# re: .NET 3.5 Installation Problems in Windows 8
by Smart November 11, 2012 @ 2:50am
why don't install .net 4.0 & 4.5
# re: .NET 3.5 Installation Problems in Windows 8
by Eric November 12, 2012 @ 6:12am
Hi Rick,

I was wondering if you have the same problem, on windows 8 64 bit I can't reference a FoxPro COM object anymore, any ole object .dll I create isn't able to be referenced by VS2010 anymore. I think it has something to do with the 3.5 32 bit version of .net. I checked the things you described above but mine was installed correct as I can conclude from your screenshots. But it looks like VS2010 doesn't use the 32 bit reference creator to build a wrapper around my FoxPro dll. Have you any sugestions where to look? Do you have the same problem?

Thanks,

Eric
# re: .NET 3.5 Installation Problems in Windows 8
by Rick Strahl November 12, 2012 @ 12:52pm
@Smart - because some apps explicitly REQUIRE .NET 3.5. In this particular case it's the CodeRush tools - .NET 4.0 didn't allow to install the tools. Basically apps can request a specific version of the .NET runtime via Config file or manifest settings.

@Eric - you need to make sure your .NET apps are compiled explicitly for x86. The default is Any CPU I believe and that means on a 64 bit app it'll run in 64bit. A 64bit app can't call a 32 bit COM component. As a workaround if the COM object is a DLL you might be able to work around this by using COM+.
# re: .NET 3.5 Installation Problems in Windows 8
by Rasoul November 27, 2012 @ 12:44am
I have installed windows 8 x64, but I can't install .net framework 3.5 from installation DVD, how can I do that?
I tried command prompt and it didn't work.
# re: .NET 3.5 Installation Problems in Windows 8
by Benjamin Siegel November 27, 2012 @ 6:52am
Hi Rick,

We ran into the same problem but resolved it via the following when testing our 3.5 .Net compiled applications under Windows 8...

Create or modify the app.config file, and set the supportedRuntime element to 4.5. This will cause the 4.0 CLR (which will use the 4.5 framework) to load the assembly, and does not require any change (ie. recompile) to the executable itself.

You might also want to include: 2.0.50727 for when CLR 4.0 is not available.

This appears to get around the whole 3.5 instalaltion requirement since 4.0/5 should run 3.5 .net compiled applications

Benjamin.
 


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2014