This project is read-only.

Gated Check-ins rejected

Aug 9, 2013 at 2:35 PM
Hi,

I am currently running gated check-ins with the 2.0 template and TFS 2012. I get the following error when I check in my files though:
A newer version of MyFile exists on the server.
Exception Message: TF10141: No files checked in: resolve the conflicts and try again. (type CheckinException)

However, if I get latest version, all the changes I made plus the assembly file version updates are there and correct. My first thought was that Continuous Integration was turned on for the gated checkins which might cause the error if a 2nd check-in was being kicked off before the first was finished, but I double checked that and CI is turned off.

I am not sure what could be going on. Does anyone have any thoughts?

Thanks,
Ian
Sep 3, 2013 at 10:05 AM
Hi Ian,

just a wild guess: Did you turn on the option "Perform Check-in of the AssemblyInfo Files" ?
I could imagine this could cause problems when building from a shelfset.

Cheers, Ben
Sep 3, 2013 at 3:26 PM
Hi Ben,

Yes, I did have the "Perform Check-in of the AssemblyInfo Files" set to True. I turned that off and the check-in worked, however we would like to have the AssemblyFileVersion attribute in the assembly files updated with every check-in that is made so we do not have to go in and manually change version numbers.

When I set that option to true in the build process as I mentioned above, the check-in works because if I get latest I can see all the assembly files have been updated plus the changes I made. But for some reason TFS is spitting out an error stating the check-in failed even though it looks like everything succeeded.

Any other ideas on this would be great.

Thanks,
Ian
Sep 5, 2013 at 8:30 AM
Hi Ian,

if I understood the issue correctly this is what happens:
1) The Code-Changes are put from the Workspace on a Shelf for the Gated-Check-In
2) The AssemblyInfo Files are updated in the Workspace
3) The AssemblyInfo Files are checked in (successfully) from the Workspace to the Server
4) The Build is done on the shelfset (also successfully but probably with the old versions -> could you verify this?)
5) The Attempt to check in the shelfset fails, because the AssemblyInfo Files on the server are newer that those on the shelf and cannot be merged.

I'm not sure if it is possible, but I think this can only be resolved in your Build process (XAML-Template) that should
  1. Update the AssemblyInfo Files locally without(!) checking them in and
  2. Perform a Gated-Check-In of your Code-Changes including(!) the changed AssemblyInfos afterwards
Cheers, Ben
Sep 6, 2013 at 8:05 PM
Hi Ben,

I updated my template to 2.0.1 from 2.0. When I perform a Gated Check-in now I get the following error:
Your check-in could not be completed because it affects the following gated build definitions.
\TeamProjectName\Gated
To complete your check-in you will need to queue a build of the shelveset Gated_2013-09-06_01.41.29.8936.

I looked at the log and it is trying to check-in the assembly file changes before checking in the shelf, which makes sense. Unlike before, now nothing gets checked in.

I am going to try your suggestion of trying to check in the assembly file updates with the gated check, not sure how to do that exactly myself, but will give it a go. Let me know if you have any other suggestions.

Thanks,
Ian
Mar 5, 2014 at 6:20 PM
What would really be needed is for the AssemblyInfo to be added to the shelfset. I'm no TFS expert so I am not sure how feasible this is.

Attempting to update the assembly info afterwards would trigger another gated-checkin build, which would not be ideal. Perhaps there's a way to do the checkin of just the assembly info and bypass the gated check-in, but that seems dirty, too.

Checking in the assembly info changes manually seems to defeat the whole purpose of using this component.

Thoughts?
  • Gary
Mar 19, 2014 at 11:40 AM
I'm having the same issue as ian_k and I'm not sure how to solve it?

Any solution available?

Thanks,

Alexander