- 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.