本文介绍了TFS 增量构建错误 - 无法执行获取操作,因为该文件已在本地存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启用我的 VS 解决方案的增量构建.在 xaml 构建过程模板的 GUI 中,我将 "Clean Workspace" 设置为 "None" 并添加了 /p:IncrementalBuild=True 作为MSBuild 参数.然后我签入了对文件的更改,但是当我运行我的 TFS 构建时,我立即收到以下错误:

I'm trying to enable incremental build of my VS solution. In the GUI for xaml build process template, I set "Clean Workspace" to "None" and added /p:IncrementalBuild=True as an MSBuild argument. I then checked in changes to a file, but when I run my TFS build, I immediately get the following error:

Unable to perform the get operation because the file already exists locally

Exception Message: One or more errors occurred while performing a Get operation. (type GetException)
Exception Stack Trace:    at Microsoft.TeamFoundation.Build.Workflow.Activities.SyncWorkspaceInternal.ThrowIfErrorsOccurred.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

我相信 TFS 获取了我的文件,但无法覆盖构建代理上的现有文件并出现错误.如何强制它覆盖文件?

I believe TFS gets my file but cannot overwrite the existing file on the build agent and errors out. How can I force it to overwrite the file?

推荐答案

文件是可写的.当存在可写文件时,除非使用/overwrite 选项,否则 get 不会覆盖它.但是,您需要弄清楚文件是如何变得可写的.您可能希望返回到创建新工作区的默认选项,使用详细日志运行构建,并查看是什么使文件可写.

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.

这篇关于TFS 增量构建错误 - 无法执行获取操作,因为该文件已在本地存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 17:21