Setup Error 0x800F0831: .NET Framework Install Fails During Upgrade

Setup error 0x800F0831 broke an in-place upgrade from SQL Server 2014 to SQL Server 2016 for one of my clients. The message said Microsoft .NET Framework 4.0 installation has failed with exit code -2146498511. I’d expect the same failure in a fresh install as well.

Gouache painting of a small stone arch bridge over a stream with a gap where the keystone belongs, a vermilion keystone resting on the grass below

The Error

I started with the setup logs and found this:

Slp: Microsoft .NET Framework 4.0 installation has failed with exit code -2146498511.
Slp: Watson bucket for Msi based failure has been created
Slp: Error: Action "Install_DotNet46_Cpu64_Action" failed during execution.
Slp: Completed Action: Install_DotNet46_Cpu64_Action, returned False

How to Check

Whenever I see a negative error number, I convert it to hexadecimal. A calculator can do it. The exit code -2146498511 becomes 800F0831, the error in the title.

From the log above, it’s clear that setup failed to install .NET 4.6 on the computer. When I looked into the folder, there was a file for the .NET install as well. Here are the lines that matter, trimmed:

Action: Performing Action on Exe at C:\3ba8c9ecb44ae8c55f756e95\x64-Windows8.1-KB3045563-x64.cab
Exe (C:\3ba8c9ecb44ae8c55f756e95\x64-Windows8.1-KB3045563-x64.cab) failed with 0x800f0831 - (null).
Exe Log File: CBS.log
Final Result: Installation failed with error code: (0x800F0831) (Elapsed time: 0 00:01:30).

The hex code matches the decimal number we saw earlier. The failure is in installing KB3045563, from the package x64-Windows8.1-KB3045563-x64.cab. As the message said, I looked into CBS.log:

Info CBS Store corruption, manifest missing for package: Package_2_for_KB4095515~31bf3856ad364e35~amd64~~6.3.1.0
Error CBS Failed to resolve package 'Package_2_for_KB4095515~31bf3856ad364e35~amd64~~6.3.1.0' [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION]
Info CBS Mark store corruption flag because of package: Package_2_for_KB4095515~31bf3856ad364e35~amd64~~6.3.1.0. [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION]
Info CBS Failed to resolve package [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION]
Info CBS Failed to get next package to re-evaluate [HRESULT = 0x800f0831 - CBS_E_STORE_CORRUPTION]

Gouache painting of a small stone arch bridge over a stream, complete, with the vermilion keystone set in place at the top of the arch

Why It Happens

The CBS log points to corruption in the component store of Windows. A manifest is missing for one package, so Windows can’t resolve it. The .NET Framework install, which setup runs, fails with that error.

The Fix

Later I found a Microsoft article about this same error and its solution. To fix the issue, follow these steps:

  1. Go to the Microsoft Update Catalog.
  2. In the Search box, enter the ID of the missing package named in CBS.log.
  3. Download the package and install it.

Confirm It Worked

After this, we were able to install the .NET Framework, and SQL Server as well.

How to Prevent It

When an installer returns a negative exit code, convert it to hex before you search. A corrupt component store can break any installer that depends on Windows servicing, not only SQL Server setup.

Did this help you? Please tell me in the comments.

Quick reference card: Setup Error 0x800F0831

A failed .NET install is not always a .NET problem, it is sometimes a corrupt Windows component store.

Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.


Discover more from SQL Authority with Pinal Dave

Subscribe to get the latest posts sent to your email.

DotNet, SQL Error Messages, SQL Server, SQL Upgrade
Previous Post
Error 35296: Log Backup on Secondary Replica Fails in a Distributed Availability Group
Next Post
SQL SERVER – Historical PHYSICAL_ONLY Bug and Version Specific Evidence

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.