0

We are using TFS gated checkin, and in Gated build definition, the CleanWorkspace option is set to "Outputs".

We recently found if you rename a file, e.g. Rename 1.txt to 2.txt, check it in through Gated build. Then add 1.txt as a new file, try to check in through Gated build. Gated build will fail and complains that file 1.txt already exists (see detailed error attached below).

From my investigation, it looks like Gated build will compare the sheveset with the existing build workspace version, but not the latest code in source control. Has anybody seen the similar issue? What is the solution? ( we do not want to set to CleanWorkspace to All because it is very time consuming).

Thanks in advance!

Error Message: The item D:...\1.txt already exists. The shelveset Gated_XXX for request XXX could not be unshelved. Exception Message: TF400921: No shelvesets could be unshelved for this build. The build will not proceed. (type NoShelvesetException) Exception Stack Trace: at System.Activities.Statements.Throw.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)

1 Answer 1

0

Well, this is a correct phenomenon. Since you didn't clean workspace, and this 1.txt still exist on the build agent. When the build control process the build, it will get this version. Certainly it will return xxx already exists.

Please refer the explanation from MSDN.

Clean Workspace

Specify whether to clean the workspace or Git repo on the build agent before it processes the build Select True to delete all existing outputs and source code files before the build is processed.

Select True to delete all existing outputs and source code files before the build is processed. Use this if you want your compilation process to be as thorough as possible at exposing problems in your build process. Use this if you want your compilation process to be as thorough as possible at exposing problems in your build process.

Source: MSDN

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.