TFS 2015 vNext 构建失败并出现错误 Unable to perform the get operation because the file already exists locally

TFS 2015 vNext build fails with error Unable to perform the get operation because the file already exists locally

在我们的增量构建期间,存储库清理参数设置为 'false'。在获取源步骤中构建间歇性失败并出现以下错误:无法执行获取操作,因为该文件已在本地存在。

有没有办法在不将存储库清理参数设置为 true 的情况下解决错误?

@Buck Hodges(微软工程总监)在this case中给出了答案:

The file is writable. When there's a writable file, get will not overwrite it unless the /overwrite option is used. However, you would need to figure out how the file is becoming writable. You may want to go back to the default option of creating a new workspace, running a build with verbose logs, and see what is making the file writable.

Build vnext agent (1.x) does not provide a way to control whether /overwrite is included. The new agent (2.x) does specify /overwrite every time in order to prevent writable files causing problems. The new agent will be the default in TFS "15" and in VS Team Services.