I have a gated checkin build which does change some files of the changeset which is provided by the user requesting the build. The build does mainly set the build version number in the source files for all targets.
The gated checkin activity does checkin the shelveset of the user. Now I want to checkin also the changed files by my build which can potentialy conflict with files part of the users shelvset. This results in merge conflicts.
Is use VersionControlServer.CheckinShelveset which has no options to force a checkin in case of merge conflicts due to the other checkin of the previous shelveset. I tried to change the shelveset provided by the user but I cannot change a shelveset which was not created by the same user. I am forced therefore to create a second shelveset and wait until the gated checkin activity which lives on the build controler has succeeded.
When I have a workspace I could resolve the changes but on the build controler there is no workspace (it is on the build agent) so I would have to create a new workspace, unshelve the shelveset of the other user and try to merge my other shelveset into this one and then try to checkin which is not easy and more seriously it would take quite some time.
Is there a way to checkin a shelveset in and force TFS to simply overwrite the latest version without having a workspace? Or is there another way to get my changes of the build checked in without merge conflicts? If I would check earlier on the build agent then the gated checin will fail with merge conflicts on the build controler.