I'm writing c# code to check-in code to TFS server:
Workspace WS = VersionControl.GetWorkspace(TeamProject);
WS.Map(TFSMapServerPath,LocalWorkingPath);
int NumberOfChange = WS.PendAdd(string.Format(@"{0}\Main\DotNet\",LocalWorkingPath),true);
PendingChange[] pendingChanges = WS.GetPendingChanges();
WS.CheckIn(pendingChanges,"Auto Check-in");
But i got the error is
"No files checked in", all files/folders under LocalWorkingPath are "Pending Change".
Are the above codes correct?
I changed the command WS.GetPendingChanges() to WS.GetPendingChanges(tfsServerFolderPath,RecursionType.Full) and it is working at my side.
Here is detail: