sodcalculator

10 Tech How-To

Fix .NET Framework 3.5 Error 0x80070002

Guide 10-54489 · Updated · Step by step

This guide walks you through fixing the Windows error 0x80070002 that appears when you try to install or enable .NET Framework 3.5. The error usually means Windows Update cannot find the needed files, often because of a corrupted update cache or a missing system component. The steps below use built-in Windows tools, so you do not need any third-party software.

What You’ll Need

  • A Windows administrator account (you’ll need to approve User Account Control prompts).
  • An internet connection (for Windows Update and the DISM online repair).
  • Your Windows installation media (USB or ISO) if the online repair fails — this is optional but recommended.

Step-by-Step

  1. Run Windows Update Troubleshooter. Open Settings (Win + I) → System → Troubleshoot → Other troubleshooters. Click Run next to “Windows Update.” Let it scan and apply any fixes. Restart your PC and try enabling .NET Framework 3.5 again.
  2. Clear the Windows Update cache. Open Command Prompt as administrator (search “cmd”, right-click, “Run as administrator”). Type the following commands one by one, pressing Enter after each:
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
    Then rename the cache folder:
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 catroot2.old
    Restart the services:
    net start wuauserv
    net start cryptSvc
    net start bits
    net start msiserver
    Close the prompt and try the installation again.
  3. Use DISM to repair system files. In the same administrator Command Prompt, run:
    DISM /Online /Cleanup-Image /RestoreHealth
    This can take 10–20 minutes. When it finishes, restart your PC.
  4. Run System File Checker (SFC). After the DISM scan, run:
    sfc /scannow
    Restart once it completes.
  5. Enable .NET Framework 3.5 via Control Panel. Go to Control Panel → Programs → Turn Windows features on or off. Check the box for “.NET Framework 3.5 (includes .NET 2.0 and 3.0).” Click OK. If it asks, choose “Download files from Windows Update.”
  6. If the above fails, use DISM with installation media. Mount your Windows ISO or insert your USB. Note the drive letter (e.g., E:). In the administrator Command Prompt, run:
    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:E:\sources\sxs
    Replace E: with your actual drive letter. This installs directly from the media, bypassing Windows Update.
  7. Check the Windows Update service. Press Win + R, type services.msc. Find “Windows Update” and “Background Intelligent Transfer Service (BITS).” Ensure both are set to “Automatic” and are running. If not, right-click → Properties → set Startup type to Automatic → Start.
  8. Reset Windows Update components (last resort). In an administrator Command Prompt, run the following script (this is a common Microsoft-recommended reset):
    net stop wuauserv
    net stop cryptSvc
    net stop bits
    net stop msiserver
    ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 catroot2.old
    net start wuauserv
    net start cryptSvc
    net start bits
    net start msiserver
    Then run sfc /scannow again and restart.

Common Mistakes

  • Skipping the restart after DISM or SFC. These tools often need a reboot to fully apply fixes.
  • Running commands without administrator privileges. The commands will fail silently or show “access denied.” Always right-click Command Prompt and select “Run as administrator.”
  • Using the wrong drive letter for installation media. If your USB is G:, using E: will give a “source not found” error. Double-check in File Explorer.
  • Not stopping services before renaming folders. If you rename the SoftwareDistribution folder while Windows Update is running, you’ll get a “file in use” error. Follow the stop commands first.

Tips

  • If you have a Windows ISO file, you can mount it by right-clicking → “Mount” instead of using a USB. The drive letter will appear in File Explorer.
  • Run the DISM online repair before SFC. DISM fixes the component store that SFC relies on.
  • Make sure your Windows is fully updated (Settings → Windows Update → Check for updates) before attempting the .NET install.
  • If you’re on a corporate network, check if Group Policy blocks Windows Update downloads. Contact your IT admin if so.

Troubleshooting

If the error persists after all steps:

  • Check for third-party antivirus interference. Temporarily disable your antivirus (not Windows Defender) and try again. Re-enable it afterwards.
  • Look at the CBS log. After a failed install, open C:\Windows\Logs\CBS\CBS.log in Notepad. Search for “0x80070002” to see which file is missing. This can give a clue if a specific update is required.
  • Try a clean boot. Run msconfig, select “Selective startup” and uncheck “Load startup items.” Restart and try the install. This rules out software conflicts.
  • Use the Windows Media Creation Tool to create a fresh ISO. Sometimes the existing media is corrupted. Download the tool from Microsoft’s website and create a new USB or ISO, then use the DISM source command again.
  • If nothing works, perform an in-place upgrade repair. Run the setup.exe from your Windows ISO while keeping files and apps. This reinstalls Windows without losing data and often fixes stubborn system corruption.

Frequently Asked Questions

What exactly does error 0x80070002 mean?

It means Windows Update cannot find the files it needs to install the feature. This is usually a temporary cache issue or a missing system component, not a hardware problem.

Why does .NET Framework 3.5 need Windows Update?

Older .NET versions are optional features that download additional files from Microsoft’s servers. If those downloads fail, you get the error.

Can I install .NET Framework 3.5 offline?

Yes, using the DISM /Source command with Windows installation media. You don’t need internet for that method.

Will fixing this affect my other programs?

No. The steps only repair Windows Update components and enable a standard Windows feature. Your files and installed programs remain untouched.

How long does the DISM /RestoreHealth command take?

Typically 10–20 minutes, but it can be longer on older hard drives. Let it finish completely; don’t close the window.

Do I need to uninstall .NET Framework 4.x first?

No. .NET Framework 3.5 and 4.x can run side by side. They are separate installations.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →