问题描述
我正在尝试启用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增量生成错误-无法执行get操作,因为该文件已在本地存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!