c++visual-studiovisual-studio-2005compiler-errorsnightly-build

Compilation fails randomly: "cannot open program database"


During a long compilation with Visual Studio 2005 (version 8.0.50727.762), I sometimes get the following error in several files in some project:

fatal error C1033: cannot open program database 'v:\temp\apprtctest\win32\release\vc80.pdb'

(The file mentioned is either vc80.pdb or vc80.idb in the project's temp dir.)

The next build of the same project succeeds. There is no other Visual Studio open that might access the same files.

This is a serious problem because it makes nightly compilation impossible.


Solution

  • It is possible that an antivirus or a similar program is touching the pdb file on write - an antivirus is the most likely suspect in this scenario. I'm afraid that I can only give you some general pointers, based on my past experience in setting nightly builds in our shop. Some of these may sound trivial, but I'm including them for the sake of completion.

    If nothing else works, you can schedule a watchdog script a few hours after the build starts and check its status; if the build fails, the watchdog should restart it. This is an ugly hack, but it's better than nothing.