Corrupted .NET Framework 4.0 Installation on Windows 10

1

After a bad Windows Update, sfc /scannow has confirmed that a bunch of .NET Framework 4.0 files are "corrupt". Here is an extract from the logs listing all corrupted files:

C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\\PresentationFramework.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\PresentationFramework-SystemData\v4.0_4.0.0.0__b77a5c561934e089\\PresentationFramework-SystemData.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\System.Windows.Controls.Ribbon\v4.0_4.0.0.0__b77a5c561934e089\\System.Windows.Controls.Ribbon.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\UIAutomationClient\v4.0_4.0.0.0__31bf3856ad364e35\\UIAutomationClient.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\UIAutomationClientsideProviders\v4.0_4.0.0.0__31bf3856ad364e35\\UIAutomationClientsideProviders.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\\UIAutomationProvider.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\\UIAutomationTypes.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\\WindowsBase.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\clr.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscordacwks.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscordbi.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\peverify.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\SOS.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\NativeImages\\mscorlib.ni.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PenIMC.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PenIMC_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PenIMC2_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PresentationCore.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PresentationFramework.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PresentationFramework-SystemData.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PresentationHost_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\PresentationNative_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\System.Windows.Controls.Ribbon.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\UIAutomationClient.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\UIAutomationClientsideProviders.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\UIAutomationProvider.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\UIAutomationTypes.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\WindowsBase.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\\wpfgfx_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\WPF\en-US\\PresentationHost_v0400.dll.mui; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\clr.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\compatjit.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\mscordacwks.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\mscordbi.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\peverify.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\\SOS.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\NativeImages\\mscorlib.ni.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PenIMC.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PenIMC_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PenIMC2_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PresentationCore.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PresentationFramework.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PresentationFramework-SystemData.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PresentationHost_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\PresentationNative_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\System.Windows.Controls.Ribbon.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\UIAutomationClient.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\UIAutomationClientsideProviders.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\UIAutomationProvider.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\UIAutomationTypes.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\WindowsBase.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\\wpfgfx_v0400.dll; source file in store is also corrupted
C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\WPF\en-US\\PresentationHost_v0400.dll.mui; source file in store is also corrupted

So far I have tried:

  1. Windows Update (appears to have caused the issue)

  2. Windows Framework Repair Tool - only repairs v4.7 or higher on windows 10. Unhelpfully asserts that everything lower is "included in the operating system".

  3. Turning off Windows Features related to .NET, restarting, and turning them back on.

    enter image description here

    I was really hopeful this would work, it claimed to be redownloading from windows update, but the net result appeared to be no change.

  4. DISM.exe /Online /Cleanup-image /Restorehealth (image not found)

  5. Downloading a source image as per this answer - but according to DISM my image is 10.0.19041.572:

    PS C:\> dism
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.572
    

    and according to "About" my image is 19042.630 - no idea why these don't align:

    enter image description here

    and the only images available are neither of those.

    List item

    I tried downloading and extracting .631 because it seemed close, but using it as a source for repair still failed with "source not found". (Followed the relatively modern instructions on wintips)

    Salient logs:

    Host machine information: OS Version=10.0.19042
    ...
    Executing command line: "C:\Windows\system32\Dism.exe" /Online /Cleanup-Image /RestoreHealth /Source:WIM:F:\sources\install.wim:6 /LimitAccess
    ...
    Target image information: OS Version=10.0.19042.630
    ...
    source for package or file not found, ResolveSource() unsuccessful. (CBS HRESULT=0x800f081f) - CCbsConUIHandler::Error
    The source files could not be found; their location must be specified using the /source option to restore the feature
    
  6. The most success I've had so far was sealing the "Microsoft.NET" folder from another computer in the house running the same version of Windows, took ownership, overwrote the files, and gave ownership back to TrustedInstaller. It did stop every app that depends on Framework 4.0 from crashing at startup (my hint that the corruption had really occurred), but sfc still sees them as corrupt.

Any suggestions that don't involve a reinstall are appreciated.

windows-10
windows-update
.net-framework
dism
sfc
asked on Super User Dec 7, 2020 by Alain • edited Dec 7, 2020 by Alain

1 Answer

1

The analysis of your CBS log has shown that the corrupt files are not contained in the downloaded ISO file and therefore the repair had to end with the error code 0x800f081f CBS_E_SOURCE_MISSING.

I downloaded the last published Net-Framework update package KB4586876 and unzipped it with 7zip. And then i unpacked the Windows10.0-KB4586876-x64-NDP48.cab file with the command expand "Windows10.0-KB4586876-x64-NDP48.cab" -f: *. * Target path again.

After that i compared the Versions Numbers with the faulty files from their log. The comparison showed that they matched.

The update package would have had to be implemented in the ISO and then the repair would have to be carried out again with the ISO as the source.

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/servicing-the-image-with-windows-updates-sxs

Then the files would have been imported and the repair would have completed successfully.

But I chose an abbreviation and created the repair package as in the comments and the SFCFix program copied the files from the package directly into the WinSxs folder and sfc then used the correct files for the repair.

answered on Super User Dec 7, 2020 by Tekkie_Boy • edited Dec 11, 2020 by Tekkie_Boy

User contributions licensed under CC BY-SA 3.0