How to install/enable .Net 3.5 SP1 on Windows Server 2008 R2 for SQL Server 2008 and SQL Server 2008 R2


The .NET Framework 3.5 SP1 (also referred to as .NET Framework 3.5.1) is a prerequisite for SQL Server 2008. SQL Server 2008 Setup for standalone instance will install the .NET Framework 3.5 SP1 if it is not already installed. In Windows Server 2008 R2, the .NET Framework is a feature and installing it is different when compared to older versions of Windows Operating System. In previous versions, one could either download the .NET Framework 3.5.1 install binaries from Microsoft download site or use the install binaries from the redist folder of the SQL Server 2008 installation media. Starting with Windows Server 2008 R2, the method of installing .NET Framework 3.5.1 has changed. This document explains how to verify that .NET Framework 3.5.1 is installed and if it is not installed how you can add it.
  
How to verify if .NET Framework 3.5 SP1 is installed:

Here are the steps to verify that .NET Framework 3.5.1 is installed on Windows Server 2008 R2.

  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight Administrative Tools and select Server Manager.
  3. In the Server Manager interface, click Features to display all the installed Features in the right hand pane. Verify that .NET Framework 3.5.1 is listed.

If .NET Framework 3.5.1 feature is not listed, you can use either of the following methods to install it:

Method 1: Using Server Manager Interface

  1. In the Server Manager interface, select Add Features to displays a list of possible features.
  2. In the Select Features interface, expand .NET Framework 3.5.1 Features.
  3. Once you expand .NET Framework 3.5.1 Features, you will see two check boxes. One for .NET Framework 3.5.1 and other for WCF Activation. Check the box next to .NET Framework 3.5.1 and click Next.
    Note: If you do not expand .NET Framework 3.5.1 Features and check it, you will get a pop-up titled Add Features Wizard  as shown below.

    Click Cancel and expand .NET Framework 3.5.1 Features and then check .NET Framework 3.5.1 check box below it.

     

    You cannot install .NET Framework 3.5.1 Features unless the required role services and features are also installed.
  4. In the Confirm Installation Selections interface, review the selections and then click Install.
  5. Allow the installation process to complete and then click Close.

Method 2: Using PowerShell

  1. Click the Start button in the lower left hand corner of the display.
  2. Highlight All Programs and select Accessories
  3. Expand Windows PowerShell and right click Windows PowerShell and select Run as administrator. Click Yes on the User Account Control box.
  4. At the PowerShell command prompt, type the following commands, and then press ENTER after each command:
  • Import-Module ServerManager
  • Add-WindowsFeature as-net-framework

Note: A screenshot is shown below:

 


Comments (47)

  1. Amit Ghosh says:

    Thanks man. It’s save my whole day. Installing .Net 3.5 solved the issue of ‘system.serviceModel’. I used the app pole in .NET 2.0

  2. Ashok says:

    i am proud of this instruction so thanks

  3. Dinesh Vishe says:

    Powershell installation is very easy.

    Import-Module ServerManager

    Add-WindowsFeature as-net-framework

    will work on on session and time saving.

  4. Dinesh Vishe says:

    Excellent…..    ahmsal1984

    avhacker  

  5. Testing-Dev says:

    Same issue here Opie-wan, did you get this resolved?

  6. Shubhangi says:

    Remot server  is not found in the shell program??

  7. Opie-wan says:

    I think I am having the same problem as Mohsen (June 28 post)  

    I am trying to add SQL Server reporting services, and when I try to add features, the installer complains that .Net 3.5.1 installation failed and it is required for SQL Server.  When I look, I verify that .net 3.5 is installed, but I have searched all over and can not find nor figure out how to upgrade .Net 3.5 to .Net 3.5.1 on Windows Server 2012 R2.  The only option I am presented with in Server Manager is .Net 3.5, and it is installed.

    Can anybody point me in the right direction?  I think once I get the .Net framework SNAFU settled, the SQL Server install will probably work.

  8. Thys says:

    Thank you !

  9. Mohsen says:

    Hi,

    When I try to install SQL server 2008, a message appear that .net framework 3.5 installing failed and need to this not 3.5.1 and problem not solved.

    Any idea?

  10. kk says:

    we upgrads the .netframework 3.5 to 4.0 in exchange server 2010 its impact to edge server 2010,2010 edge server support to .net framwork 4.0

  11. Roberto says:

    Hi,

    I have tried both suggested way, but:

    when I try trough server manage, at the end of the installation process, the system prompts that ita has been impossible to install all 3 services/roles required.

    If i try with PowerShell, I cannot import server manager module.

    Any clue on this?

    Thank you

  12. WILLIAM ROBINSON says:

    What does net framework  3.5 p1 do? Is it absolutely necessary?

  13. Yogesh Mahto says:

    I'v solved the problem,thanks a lot!

  14. chathuranga says:

    hi

    can i update .net framework 3.5 to 4.5. if any one know please help me

  15. 444 says:

    Installing a Windows language pack before installing the .NET Framework 3.5 will cause the .NET Framework 3.5 installation to fail. Install the .NET Framework 3.5 before installing any Windows language packs.

  16. I. Greß says:

    Thanks a lot, it was very useful.

    Greetings from Mexico

  17. Vikram says:

    Thanks for the detailed info…I solved the problem.

  18. avhacker says:

    One single line can do it, and you can put it in your batch file:

    powershell "Import-Module ServerManager; Add-WindowsFeature as-net-framework"

  19. avhacker says:

    one single line can do it, and you can put it in your batch file:

    powershell "Import-Module ServerManager; Add-WindowsFeature as-net-framework"

  20. Gyanendra says:

    I am also facing the same problem . and when I check in server manager it shows 3.5 is already installed. But  I run your command from command shell but problem is remain same. Please help me…

  21. Daniel Comp says:

    Thanks – funny how such a 'simple' thing can stop the whole show!

  22. David Borojevic says:

    Thanks – your first sentence answered my question after looking through various forums where others were also confused by inconsistent naming conventions for ,net;   many replies were from others thinking they knew the answer were just adding confusion:

    The .NET Framework 3.5 SP1 (also referred to as .NET Framework 3.5.1).

    Thanks

  23. Dattatraya says:

    you can uninstalled .net3.0 and 2.0  and install It

  24. Jamel says:

    Thanks for this little helpful post !

  25. Ian says:

    Most painless solution I found for Server 2008 R2 is,

    "ocsetup.exe NetFx3"

  26. Edgard says:

    Hi everyone, My name is Edward, I need a hand to the community, the thing is that I need to install a Web project Designed with MVC, which use the Framework meadow, detail is that I need to install it on Windows Server 2008, which should lift through iis7, where this and I have it set. I have everything you need (Prado, PHP, MySQL server, phpMyAdmin), just missing lift on the server where I try but I can not … Greetings and thanks …

  27. sqlnut says:

    How do I enable framework 4 when 3.5 is currently installed?

  28. Burak says:

    Loving that command lines! It is too easy. Thanks.

  29. vaishali says:

    plzz suggest me a dot net framwork package for windows starter 32 bit!! plzz mail me the details in vaish.1412@gmail.com…plzz i need help..coz i for JDBC im not able to connect sql server 2008 r2 express and netbeans..

  30. RIchard says:

    Hi,

    a nice hint, however enabling .net requires Windows Updates to be enabled. In my environment our servers are never connected to the internet and Windows Updates are disabled by default becuse of the risk of screwing up the system.

  31. Ajit Surana says:

    Run the command prompt as an Administrator.

    Type the following command. It should install the .NET 3.5 SP1

    powershell Import-Module ServerManager;Add-WindowsFeatures as-net-framework

  32. I'v solved the problem,thanks a lot!

  33. George says:

    Worked perfectly!

    Thanks,

    George

  34. emilk says:

    🙂 funny..

    Isn't it way easier to run powershell -NonInteractive … from command-line (batch)?

  35. DanSpec says:

    Ok, this took me a while to figure out. I wanted to push this job out to my 2008R2 systems without enabling scripts or using an .exe. When I called powershell with a batch file it would run in 32x mode and fail. So with some googling and testing I was able to get the following to work.

    Create a vbs script using the code below. Then call it with cscript scriptname.vbs (I left the -noexit so I can tell if it ran or not – your mileage may vary)

    Set objShell = CreateObject("Wscript.Shell")

    objShell.Run("%windir%sysnativeWindowsPowerShellv1.0powershell.exe -noexit Import-Module ServerManager;Import-Module ServerManager")

  36. To install from batchfile says:

    dism /online /enable-feature /featurename:NetFx3

    or

    start /w ocsetup NetFx3

  37. jason says:

    In my windows 2008 r2 it shows dot net framework 3.5.1 installed, But I couldn't see that in application pools. I did the powershell option but it wont help, the following output shows up

    Success Restart Needed ExitCode  Feature Result

    ——-         ————– ——— ——————

    True          No                       NoChan… <>

    any idea ,

    thanks for your help

  38. Malar says:

    Hi,

    We are moving from dotnet  server 2003 to Dotnet server 2008 R2. But find some issues like we didnt get the homepage images in dot server 2008 R2 environment. Can anyone help me on this issue?

  39. AC says:

    Sweet article. Simple step by step and direct to the point I've been trying to install a program into my new 2008 R2 server and it kept giving me issues becuase it can not initialize .net app. Removed new program and re-installed – working like a charm. Thanks!

  40. Jesse says:

    what is the powershell install for .net 4?

    guessing it is similar to "Add-WindowsFeature as-net-framework" but different 🙂

  41. vikas says:

    How can I run above code if there is no .net installed on the machine 🙂

  42. SOMINDRA KANNANGARA says:

    After 2 hours I found this article. Thank you anyway. This has sorted my problems.

  43. Jason B says:

    these methods are not helping me out here.  I am still only seeing the feature of .net 3.0.  are there any other options to getting this feature available?

  44. Tray says:

    From a batch file this should work:

    c:windowssystem32ServerManagerCmd.exe -i AS-Net-Framework

  45. ahmsal1984 says:

    using System;

    using System.Diagnostics;

    namespace PrerequisiteHelper

    {

    class Program

    {

    static void Main(string[] args)

    {

    ProcessStartInfo startInfo = new ProcessStartInfo();

    startInfo.FileName = "powershell.exe";

    startInfo.Arguments = "Import-Module ServerManager ; Add-WindowsFeature as-net-framework";

    startInfo.WindowStyle = ProcessWindowStyle.Hidden;

    startInfo.UseShellExecute = true;

    Process p = new Process();

    p.StartInfo = startInfo;

    p.Start();

    p.WaitForExit();

    }

    }

    }

    source: community.flexerasoftware.com/…/index.php

  46. Hi,

    is there any way to enable it, using a batchfile? i'm creating an install batch file, which installs SQL 2008, and .NET 3.5 on my servers. But some of the servers are under Windows 2008. installing .NET fails on them. What i have to do is what you said above. But I should do it using Batchfile. Would you please tell me how to do that?

  47. rene ortuño says:

    this works like a charm i made it in both ways and worked perfect thanks again

    best regards