The ever annoying DOT NET 3.5 on Server 2012, 2012 R2, Windows 8, and 8.1


High level summary:

  • In Server 2012 or 2012 R2:
  1. Find and remove these 3 hot-fixes in Control panel: KB2966826, KB2966827, KB2966828
  2. Pop in the Windows DVD media, and install DOT NET 3.5 from the Server Manager/Add Roles and Features
  • In Windows 8 or 8.1:
  1. Find and remove these 3 hot-fixes in Control panel: KB2966826, KB2966827, KB2966828
  2. Pop in the Windows DVD media, and run the command
    Dism.exe /online /enable-feature /featurename:netfx3 /source:d:\sources\sxs /all

Windows Server 2012, 2012 R2, Windows 8, and 8.1 come with DOT NET 4 or 4.5 but not 3.5. DOT NET 3.5 came with Server 2008, 2008 R2, and Windows 7. It was easily installable as a standalone executable. A lot of older applications need DOT NET 3.5 to run.

With Server 2012/Windows 8 and up, we cannot just install DOT NET 3.5 from the executable. That errors out.

In Server 2012 and up, we’re supposed to install roles and features from Server Manager/Add Roles and Features:

dotnet35b

First, go to control panel/uninstall a program/View installed updated, and remove any of these updates if you find them:

KB2966826
KB2966827
KB2966828

or, use this Powershell script:

$RemoveMe = @('KB2966826','KB2966827','KB2966828')
$HotFixes = (Get-HotFix | Sort HotFixID).HotFixID

Write-Host 'Hotfixes installed on this system are:' -ForegroundColor Green
$HotFixes

if ($HotFixes | Where { $RemoveMe -contains $_ }) {
 Write-Host 'Found matching Hotfixes:' -ForegroundColor Yellow
 $HotFixes | Where { $RemoveMe -contains $_ }
} else {
 Write-Host 'No matching Hotfixes Found' -ForegroundColor Green
}

# To remove:

<#
$HotFixes | Where { $RemoveMe -contains $_ } | % {
 "Removing Hotfix: $_"
 & “wusa.exe /uninstall /kb:$($_.Replace(‘KB’,'')) /norestart”
}
#>

Un-comment the lines at the bottom to remove.

Add DOT NET 3.5 as a feature:

dotnet35c

That shows the warning that the media is missing:

dotnet35d

Click “Specify an alternative source path”

dotnet35e

I popped in the Windows DVD in my drive D: and typed in d:\sources\sxs

That’s all.

In Windows 8 and above, we can use the DISM command to do the same:

Dism.exe /online /enable-feature /featurename:netfx3 /source:d:\sources\sxs /all

Again d: is your DVD drive letter

This has been shown to work like this example..


10/2/2014:

DOT NET 3.5 on Windows 10 Technical Preview seems to work fine.

 

Advertisements

6 responses

  1. bar

    The last KB number has a typo in the body of the message ’28’ not ’82’

    September 27, 2014 at 6:18 pm

  2. Actually it is not a typo. It’s matching against Any KB that starts with “KB296682” which includes “KB2966820”, “KB2966821″,”KB2966822″,…,”KB2966829”
    Since we’re only interested in the ones ending in 6,7,8, the match will result in TRUE for all 3 of them. KBs starting with 296682 and ending with 0,1,2,3,4,9 don’t exist. The only false positive we get is “KB2966825”. I opted to accept this minor inaccuracy as opposed to adding a RegEx to get an exact match of the 3 KBs we’re working with..

    September 28, 2014 at 6:36 am

  3. The powershell script doesn’t work for me (after fixing quotes etc), never matches the hotfixes, even though they are installed

    September 30, 2014 at 6:16 am

    • Hi Derek, Thanks for bring this bug to my attention. I’ve updated the script above to fix the array vs array matching. I’ve also fixed the issue where quotes are replaced in the post’s text. You should be able to copy and paste without having to fix anything now..
      Let me know if that works..

      September 30, 2014 at 8:54 am

  4. Pingback: DOT NET 3.5 for Windows 10 Technical Preview | Sam's Corner

  5. Keshk

    thanks . its work

    January 31, 2017 at 9:25 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s