“Installing one or more roles, role services, or features failed.” If you received this error message after you tried to install the .NET Framework 3.5 on Windows Server 2012 or Windows Server 2012 R2, read on.
Latest posts by Michael Pietroforte (see all)

I’ve lost count of how many times I’ve seen this error, and every time I start searching again to solve the problem. Thus, I decided to write this blog post so I never forget the solution again.

I wonder why I have to install the .NET Framework 3.5 in the first place. I still remember the times when downward compatibility was Redmond’s Holy Grail. Nowadays, if you try to install a tool that hasn’t been updated in a while, you will receive the error message that the .NET Framework 2.0, 3.0, or 3.5 is missing.

The other thing I don’t understand is why I can’t just tell Server Manager to install the Framework without hassle. This brings me to today’s topic.

.NET 3.5 install failed

Even if your server still has access to Windows Server’s installation sources, you will most likely run into this error if you try to install .NET Framework 3.5 Features in Server Manager:

Feature installation: Installation of one or more roles, role services, or features failed.

Message indicating .NET Framework 3.5 installation failed on Windows Server 2012 R2

Message indicating .NET Framework 3.5 installation failed on Windows Server 2012 R2

This is always the point where I remember that I shouldn’t have ignored the warning in the installation wizard’s previous screen.

“Do you need to specify an alternate source path” warning

“Do you need to specify an alternate source path?” warning

Install .NET 3.5

The answer to this question is, almost always, yes. You do have to specify an alternate source path if you want to install the .NET Framework 3.5. This is odd because this isn’t required if you install another role or feature with Server Manager. A nondescript link at the bottom of the screen leads the way to the alternate path.

Specify .NET 3.5 alternate installation source with Group Policy

Specify an alternate source path

When you read the short story in the next dialog window that pops up when you click the link, you’ll learn that source files for .NET Framework 3.5 Features are not installed as part of a typical installation, but they are available in the side-by-side store (SxS) folder.

The side-by-side store (SxS) folder

The side-by-side store (SxS) folder

Unfortunately, the claim that the SxS folder is in E:\Sources\SxS\ is often wrong. In my case, it was D:\Sources\SxS\. The drive letter of your Windows Server setup DVD can, of course, vary. Alternatively, you can load the installation files from a server share, if one of the admins in your organization was kind enough to store them there.

PowerShell and dism

You can also install the .NET Framework 3.5 from a command prompt:

dism /online /enable-feature /featurename:NetFX3 /all /Source:<drive>:\sources\sxs /LimitAccess

You have to replace <drive> with the drive letter where your Windows Server setup DVD is located.

You can also leverage PowerShell to install .NET 3.5:

Install-WindowsFeature –name NET-Framework-Core –source <drive>:\sources\sxs

Install .NET 3.5 with PowerShell

Install .NET 3.5 with PowerShell

Note that the PowerShell way only works on Windows Server 2012 and Windows Server 2012 R2.

Specify source with Group Policy

If you don’t want the admins in your organization to waste time finding out why the .NET installation failed, you can configure the Group Policy setting Specify settings for optional component installation and component repair. The policy is located at Computer Configuration > Administrative Templates > System.

Specify .NET 3.5 alternate installation source with Group Policy

Specify .NET 3.5 alternate installation source with Group Policy

You can configure multiple locations by separating them with semicolons.

None of this is rocket science. My complaint here is that it is totally unnecessary to send thousands of admins to Google to find out where this miraculous SxS folder is located. Why doesn’t the Server Manager automatically find the installation source? Let me know if you understand the logic behind this unnecessary hurdle to install .NET 3.5.

22 Comments
  1. John 9 years ago

    Heh. Yep this drives me bonkers too. I still constantly forget to install it.

  2. Well, now you know how not to forget it. Write a blog post about it. Alternatively, you can create a bookmark for this post. 😉

  3. Johan 9 years ago

    In some cases you will keep getting this error. No mather what you do. The problem i saw is that you have installed a language pack. Because of this it is impossible to install the .Net feature and other features in some cases, like Desktop Expierence. Uninstall the langauge pack, install the .Net feature and then install the language pack or other features that wouldn’t install.

  4. Johan, that’s interesting. Thanks for the tip. A while back I saw a discussion in a forum from people who were unable to install .NET 3.5 even when they directed Server Manager to the correct SxS folder. But if I remember it right, an update is supposed to fix the problem.

  5. Johan 9 years ago

    Michael, that is correct. I also saw that fix and applied it to my servers. Unfortunally that didn’t fixed my problem.

    The problem you are talking about are the KB2966826, KB2966827, KB2966828 updates. After uninstalling these updates you should be able to install the .Net feature. If the feature install still wont work then take a look at your langauge settings en put everything back into default English. Remove the installed language with the lpksetup.exe tool.

  6. I see. It seems Microsoft introduced quite a few obstacles to prevent people from installing this Framework.

  7. andre 9 years ago

    Can’t you just download the full setup file, and install that way?

  8. andre, I think you can only download .NET 3.5 for Windows Server 2008, but not for newer server versions.

  9. Andre 9 years ago

    i haven’t had any apps that need the older .net versions yet, but good to know for the future, if necessary.
    how is the .net 3.5 in the SXS folder, different from the .net 3.5, that is downloaded from the web?

    seems powershell is the way to go

  10. Andre 9 years ago

    just installed .net 3.5/2.0, as per the powershell method…flawless, no errors
    Thx!

  11. Michael Gray 9 years ago

    THANKS!!! I’m sure this post just saved me a couple of hours of unnecessary aggravation.

  12. Ytsejamer1 8 years ago

    The solution that worked for me was this:

    Enabling “Specify settings for optional component installation and component repair” option in the local PC policy.

    1. Type gpedit.msc in RUN or Start search box and press Enter. It’ll open Group Policy Editor.

    2. Now go to:

    Computer Configuration -> Administrative Templates -> System

    3. In right-side pane, look for “Specify settings for optional component installation and component repair” option.

    4. The option would be set to Not Configured. Double-click on it, set it to Enabled and enable “Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS)” option.

  13. Ryan Clark 8 years ago

    I have tried EVERY single suggestion that I can find online and STILL have no luck on installing this .NET Framework 3.5.
    The closest I’ve come is via command Prompt and being advsied that the operation is 100% complete, yet when I check via roles and Features, 0 of 3 items remains as the status – why would this happen?
    Also, are there any other suggestion not listed above? As I said, I’ve used CMD, Powershell, Roles and Features, copied files from source disk onto C drive, ensured the 3 windows updates aren’t installed.
    Note: I’m installing on an HP Porliant DL380 G9 Server hostign Windows 2012 Standard R2 and it’s offline and will never be connected to internet.
    Thanks!

  14. Ryan Clark 8 years ago

    Here’s a suggestion that FINALLY worked for me that I haven’t seen anywhere, which hopefully saves someone else hours/days/weeks of pain here:
    **Disable Update KB2919355**
    I then tried installing via ‘Add roles and Features’ and other than power cycling the system, it was (at last) very straightforward (not that power cycling is particulalry tedious!).
    Once installed, be sure to re-install the update: http://www.microsoft.com/en-gb/download/details.aspx?id=42334

    Another troubleshooting option if nothing else! Merry Christmas!!

    • Robert J. 5 years ago

      Thank you Ryan, I know this is a long time ago post, but still holds tru today. I spent what may have seem days, weeks, months, maybe even years trying every which way to get dot NET 3.5 and below installed on a Windows Server 2012 R2 Datacenter VM, and didn’t want to loose any customizations or start over…used Server Manager, DISM, PS, etc to no avail. removed KB296826, 27, and 28 to no avail…. Finally removed KB2919355, took twice for it to finally remove even with a reboot, and BAM, was able to add dot NET 3.5 feature via server manager. Thanks PITA M$ !!!

      How did you discover this was the KB that was holding it up?

    • Ephraim Poeng 3 years ago

      YOU ARE THE MAN

  15. Johannes Nessa 7 years ago

    Ytsejamer1 ‘s solution worked with the local PC policy worked well for me.

    Thanks

  16. Sergio Raúl Carreño Aranguiz 7 years ago

    I used an image of Win Server 2012 R2 to get the sxs folder.

     

    Everything worked fine.

    Thanks a lot!

  17. Jeremy 7 years ago

    I specified the path to the Windows iso file and the .Net files were successfully installed.

  18. Mayur 4 years ago

    uninstalled the following updates and still get the problem with installing .net

    KB2919355
    KB296826
    KB296827
    KB296828

    anyone any other ideas as i have tried everything under the sun to resolve this (well pretty much).

  19. Paul S 4 years ago

    Thanks for this, still relevant in 2020 for those with 2008 R2 machines and in place upgrades.

  20. Larry 4 years ago

    5 years later….

    Trying to install on a 2012 R2 server….

    Finally, did the local group policy and point to Windows Updates and that worked… Thanks everyone for this thread…

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2023

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account