【问题标题】:TFS fail to build with "sqlite3\db.lock' because it is being used by another process"TFS 无法使用“sqlite3\db.lock”构建,因为它正在被另一个进程使用”
【发布时间】:2019-07-01 17:25:46
【问题描述】:

我们已从旧的 xaml-build 定义切换到 TFS 2017 中的新构建定义。当我们尝试构建项目时,它失败并出现以下错误:


Starting: Build
******************************************************************************
Current agent version: '2.117.2'
******************************************************************************
Starting: Initialize Job
******************************************************************************
Prepare build directory.
One or more errors occurred. (One or more errors occurred. (The process cannot access the file 'E:\agent builds\agent1\1\s\Server\.vs\Server\v15\Server\sqlite3\db.lock' because it is being used by another process.)) (The process cannot access the file 'E:\agent builds\agent1\1\s\Server\.vs\Server\v15\Server\sqlite3\db.lock' because it is being used by another process.)
******************************************************************************
Finishing: Initialize Job
******************************************************************************
******************************************************************************
Finishing: Build
******************************************************************************

为什么在构建时会锁定一个 sqlite 数据库?什么配置错误会导致这种情况?

【问题讨论】:

    标签: tfs


    【解决方案1】:

    我发现我们的一位开发人员最近在 TFS 服务器上的 Visual Studio 2017 中手动构建了该项目,即使 VS 已关闭,文件似乎也被它锁定了。重新启动 TFS 服务器解决了这个问题。

    【讨论】:

    • 谢谢@Robert,TFS 服务器重启解决了我的问题。
    【解决方案2】:

    确保您没有签入不需要的文件和文件夹(即 bin、obj 和 .vs 文件夹)。为了排除这些事情,如果您使用的是 TFVC,您可能需要使用 .tfignore 文件;如果您使用的是 git,则可能需要使用 .gitignore 文件。

    【讨论】:

    • 感谢您的回复!这些文件不是签入的一部分。我发现我们的一位开发人员最近在 TFS 服务器上的 Visual Studio 2017 中手动构建了该项目,如果 vs 关闭,文件似乎被它锁定。重新启动 TFS 服务器解决了这个问题。将在最少 2 天的等待后将此作为答案。
    【解决方案3】:

    .vs 和其中的文件不应检入 TFS。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-03
      • 2023-03-23
      • 2020-07-10
      • 2023-01-30
      • 1970-01-01
      • 1970-01-01
      • 2012-08-04
      • 2018-03-27
      相关资源
      最近更新 更多