Fix: Issues when installing .Net Framework 3.5

microsoft_net_framework3.5One error that sometimes occurs when installing/upgrading Act!, and many other products, is during the install/upgrade of MS SQL Server.

For Act! installs/upgrades, the typical error you might receive is as per this knowledgebase article: "Act! pre-requisite has encountered a problem and needs to close." When Installing Act!

This error is not an Act! issue, but an issue installing MS-SQL on Windows operating systems from Windows 8 onwards, when the .Net Framework v3.5 isn’t enabled or has a problem with its setup.

You can also get similar issues updating SQL Server 2014 or adding Roles when the .Net 3.5 install lacks the right service pack.

The first step is to try enabling the Framework manually via the Control Panel.

Installing .Net 3.5 via Control Panel

As per this Microsoft article, you can enable the .NET Framework 3.5 through the Windows Control Panel. This option requires an Internet connection.

  1. Press the Windows key Windows Windows logo on your keyboard, type "Windows Features", and press Enter. The Turn Windows features on or off dialogue box appears.

  2. Select the .NET Framework 3.5 (includes .NET 2.0 and 3.0) check box, select OK, and reboot your computer if prompted.

Dotnet-Control-PanelYou don't need to select the child items for Windows Communication Foundation (WCF) HTTP Activation and Windows Communication Foundation (WCF) Non-HTTP Activation unless you're a developer or server administrator who requires this functionality.




Troubleshooting .Net 3.5 Installation Failure

During installation, you may encounter one of these errors 0x800f0906, 0x800f0907, 0x800f081f, or 0x800F0922.

Or you might get the error “The following feature couldn’t be installed, The source files could not be found”.

Or, on Server 2012, you might get “Do you want to specify an alternate source path? One or more installation selections are missing source files on the destination server”

Microsoft covers some of the basics in this article. However, as it misses fixes for some of the errors and is, in my opinion, incomplete, I thought I would document my preferred solutions.

Check the System and Security Action Centre

  1. Hold the Windows Key and press R
  2. In the Run dialogue, type: wscui.cpl
  3. If you see any warnings, you should resolve them.

Using DISM and an SFC/DISM Scan

Try installing via DISM to enable the .Net 3.5 Framework:

  1. Open a Command or PowerShell Prompt as an Administrator – Press Windows Key + X to open Win + X menu and choose Command Prompt (Admin) or PowerShell (Admin) from the menu.
  2. When the Command Prompt starts, changing “X” for the drive of your Windows ISO.
    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:X:\sources\sxs
  3. The operation will now start. Keep in mind that it can take a while to finish, so don’t interrupt it.

If that fails, perform an SFC scan, by doing the following:

  1. From an Administrator Command Prompt
  2. sfc /scannow and press Enter.
  3. SFC scan will now start. Keep in mind that SFC scan can take about 15 minutes to finish, so don’t interrupt it.

Once the SFC scan is finished, try to install .NET Framework 3.5 again.

If it doesn’t work, you might have to perform DISM scan as well.

To do that, just follow these steps:

  1. Open Command Prompt as administrator.
  2. Now run each of the following commends:
    1. DISM /Online /Cleanup-Image /CheckHealth
    2. DISM /Online /Cleanup-Image /ScanHealth
    3. DISM /Online /Cleanup-Image /RestoreHealth

The scans can take more than 15 minutes to complete, so be sure not to interrupt them

Once you complete the DISM scan, reboot and try to install .NET Framework 3.5 again.

Installing from a Clean ISO

Sometimes, the Windows files you have can be damaged. In that case, you need to follow these steps

Download the Windows Media Creation Tool

  1. For Windows 10 users, download the Windows Media Creation Tool, which is a tool that helps you create a Windows 10 ISO. If running Windows 8.1, download the Windows 8.1 Installer.
  2. Use the Windows Media Creation Tool to create a Windows ISO image locally.
  3. When the download is complete, mount the ISO by double-clicking on it.

For Windows Server 2012 R2, you can download the appropriate Evaluation ISO

Copy the SXS folder

  1. Open the mounted ISO, and go into the Sources folder.
  2. There should be a folder named sxs.
  3. Copy the folder to another location on your computer.
  4. Right click on the copied folder, and choose Properties from the drop-down menu.SXS Properties
  5. When the Properties window opens, click on the Security tab.
  6. Select your username from the Group or user names box; check if there is a checkmark next to Read and Write in the Permissions for [Your Username] box. You could also add “Everyone” or “Domain Users” if wanting to store and run from a network share.
    SXS Security Tab
  7. If you do not find the check marks, you should click on the Edit button, select your username, and check both the Read and the Write box.

Edit the Group Policy

Press Windows Key + R and enter gpedit.msc. Now press Enter or click OK. Keep in mind that this tool is available only on Pro versions of Windows 10, but there’s a way to run Group Policy Editor on the Home version of Windows.

  1. When Group Policy Editor starts, in the left pane go to:
    Computer Configuration > Administrative Templates > System.
  2. In the right pane, double-click on
    Specify settings for optional component installation and component repair.
  3. A new window opens.
  4. Select Enabled.
  5. In the Alternate source file path, enter the address of the sxs.
  6. Then click on Apply and OK.
    Gpedit - Specify settings for optional component installation and component repair
    Optional: Check Download repair content and optional features directly from Windows Update instead of Windows Server Update Services.
  7. After making these changes, you just need to start Command Prompt as administrator and run gpupdate /force command to apply the changes.

Finally

Now it should install from an Admin Command Prompt with the command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:X:\sources\sxs
Remember to change “X:\sources\sxs” to the correct location of the sxs folder.

It’s also advisable to backup your system and, if you’ve had issues like this, you might also consider:
Repairing your Windows Image

Please post to the comments if these worked for you, or if you’ve encountered this problem and these solutions didn’t help.

No comments: