You have the following setup on TFS:
A Build for Gated check-in for a given TFS project and and path.
You want to creart a new Build with the TfsVersioning for the same path so to trigger it manually when you want the version to increase.
When you trigger the Build with the TfsVersioning you get the following error:
"Your check-in could not be completed because it affects the following gated build definitions. [folder[folder [gated Build Name] To complete your check-in you will need to queue a build of the shelveset Gated_xxx-xxxxxxxx;"
This is caused because the TfsVersioning tries to check-in the changes for the versions, but this check-in will trigger the Gated Checkin and so, the TfsVersioning check is aborted.
At the file 'CheckInFiles.cs' you have already an override for the CI builds. You can add simiral an override for the Gated Check-in. The option OverrideGatedCheckIn can be specified.
Bellow is the changes i did and works for my case at Method Execute(..):
workspace.CheckIn(workspace.GetPendingChanges(), "Versioning Build Process", "NO_CI
", null, null,
"Checking in modified AssemblyInfo files as part of Versioning Build Process",
WorkspaceCheckInParameters parameters = new WorkspaceCheckInParameters(pendingChanges, "NO_CI
parameters.OverrideGatedCheckIn = true;
parameters.Author = "Versioning Build Process";
parameters.PolicyOverride = new PolicyOverrideInfo("Checking in modified AssemblyInfo files as part of Versioning Build Process", null);
parameters.SuppressEvent = true;
Thanks, and you also you did a great job with this release!!