编译随机失败:“无法打开程序数据库" [英] Compilation fails randomly: "cannot open program database"

查看:18
本文介绍了编译随机失败:“无法打开程序数据库"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 Visual Studio 2005(版本 8.0.50727.762)进行长时间编译期间,我有时会在某些项目的多个文件中遇到以下错误:

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:	empapprtctestwin32
eleasevc80.pdb'

(提到的文件是项目临时目录中的 vc80.pdbvc80.idb.)

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

同一项目的下一次构建成功.没有其他打开的 Visual Studio 可能访问相同的文件.

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.

推荐答案

可能是防病毒软件或类似程序在写入时接触了 pdb 文件 - 在这种情况下,防病毒软件是最有可能的嫌疑人.恐怕我只能根据我过去在我们店里设置夜间构建的经验,给你一些一般性的建议.其中一些可能听起来微不足道,但我将它们包括在内是为了完成.

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.

  • 首先,确保您从头开始.也就是说,在开始每晚之前强制删除构建的输出目录.
  • 如果您的夜间计算机上装有防病毒软件、反间谍软件或其他此类程序,请考虑将其删除.如果这不是一个选项,请将您的 obj 文件夹添加到程序的排除列表中.
  • (可选)考虑使用 VCBuild 或 MSBuild 等工具作为夜间活动的一部分.我认为如果您使用的是多核机器,最好使用 MSBuild.我们将 IncrediBuild 用于 nightlies,将 MSBuild 用于发布,从未遇到过您描述的问题.

如果没有其他效果,您可以在构建开始几个小时后安排一个看门狗脚本并检查其状态;如果构建失败,看门狗应该重新启动它.这是一个丑陋的黑客,但总比没有好.

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.

这篇关于编译随机失败:“无法打开程序数据库"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆