Visual Studio 2015 cannot update program database (error C2471)

2.6k views Asked by At

I'm suddenly started getting a lot of "Error C2471 cannot update program database". According to https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2471?view=msvc-170 the reason can be

  • Make sure that the disk has enough available space. (I have 115 GB free)
  • Make sure that the file is not read-only. (I deleted it and it still don't work)
  • Make sure that there are no sharing violations. (I could delete it. I also tried loggin out and rebooting)

I have tried to revert to earlier versions of my project, but still get the error.

2

There are 2 answers

1
Ben On

I have just resolved this issue by uninstalling update KB5029366 issued around 11/10/23

0
ika On

The issue is most likely caused by the Visual Studio 2015 Update KB5029366 released by Microsoft on 10/10/23. Same issue exists with Visual Studio 2013 Update KB5029365.

Here is a link to relevant discussion: https://developercommunity.visualstudio.com/t/Visual-Studio-2015-Update-with-number-KB/10491370.

According to the discussion, besides uninstalling the update, there are other workarounds (you only need one of the following):

  1. Turn off precompiled headers completely with the /Y- switch.
  2. Disable minimal rebuild and switch to old-style debug information with these two switches /Gm- /Z7.
  3. Disable part of the precompiled header with the undocumented switch /d1BNOPPCH.

Microsoft is working on a fix, so hopefully the workarounds will be needed only temporary.