TFS fail to build with "sqlite3\db.lock' because it is being used by another process"

时间:2019-01-07 13:08:00

标签: tfs tfs2017

We have switched from the old xaml-build definitions to the new build definitions in TFS 2017. When we try to build the project it fails with the following error:


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
******************************************************************************

Why is it locking an sqlite database when building? What can be configured wrong to cause this?

3 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

请确保您没有检入不需要的文件和文件夹(例如bin,obj和.vs文件夹)。为了排除此类情况,如果使用TFVC,则可能需要使用.tfignore文件;如果使用git,则可能需要使用.gitignore文件。

答案 2 :(得分:0)

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