Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
744 views
in Technique[技术] by (71.8m points)

msbuild - TFS Incremental build error - Unable to perform the get operation because the file already exists locally

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)

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...