I\'m writing c# code to check-in code to TFS server:
Workspace WS = VersionControl.GetWorkspace(TeamProject);
WS.Map(TFSMapServerPath,LocalWorkingPath);
int
I changed the command WS.GetPendingChanges() to WS.GetPendingChanges(tfsServerFolderPath,RecursionType.Full) and it is working at my side.
Here is detail:
//Get the current workspace
WS = versionControl.GetWorkspace(workspaceName, versionControl.AuthorizedUser);
//Mapping TFS Server and code generated
WS.Map(tfsServerFolderPath,localWorkingPath);
//Add all files just created to pending change
int NumberOfChange = WS.PendAdd(localWorkingPath,true);
//Get the list of pending changes
PendingChange[] pendings = WS.GetPendingChanges(tfsServerFolderPath,RecursionType.Full);
//Auto check in code to Server
WS.CheckIn(pendings,"CodeSmith Generator - Auto check-in code.");