I've written a TFS 2013 Build Definition using TfvcTemplate.12.xaml
, set it to trigger on each check-in and to not clean the workspace. When the build runs it modifies certain source files under source control when the build runs. If I then check-in changes for a file that was modified on the build machine during the previous check in, I 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)
Is it possible to get TFS to do a Get with Overwrite when running the "Get sources from Team Foundation Version Control" step? I want my Build Definition to overwrite modified files on the build agent that do not match source control and do not want to set my build definition to clean the workspace.
In a previous version of TFS I could do it by adding the following to TFSBuild.proj:
<IncrementalBuild>True</IncrementalBuild>
<GetOverwrite>True</GetOverwrite>