- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
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
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
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 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
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
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
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.
Heh. Yep this drives me bonkers too. I still constantly forget to install it.
Well, now you know how not to forget it. Write a blog post about it. Alternatively, you can create a bookmark for this post. 😉
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.
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.
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.
I see. It seems Microsoft introduced quite a few obstacles to prevent people from installing this Framework.
Can’t you just download the full setup file, and install that way?
andre, I think you can only download .NET 3.5 for Windows Server 2008, but not for newer server versions.
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
just installed .net 3.5/2.0, as per the powershell method…flawless, no errors
Thx!
THANKS!!! I’m sure this post just saved me a couple of hours of unnecessary aggravation.
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.
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!
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!!
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?
YOU ARE THE MAN
Ytsejamer1 ‘s solution worked with the local PC policy worked well for me.
Thanks
I used an image of Win Server 2012 R2 to get the sxs folder.
Everything worked fine.
Thanks a lot!
I specified the path to the Windows iso file and the .Net files were successfully installed.
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).
Thanks for this, still relevant in 2020 for those with 2008 R2 machines and in place upgrades.
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…