I'm using the .NET libraries provided by Microsoft for interaction with Visual Studio Team Services. I want to be able to change the local path of the working folder without using Team Foundation Power Tools or Visual Studio, only using the class library i'm making.
The problem is changes aren't being recognized by the source control in the new location. I can see the new working folder through the Power Tools menu for workspaces but it doesn't automatically detect changes inside that working folder.
This is my code for this functionality:
this.workingFolder = new WorkingFolder(this.workingFolder.ServerItem, newLocalFolder);
workspace.CreateMapping(workingFolder);
UpdateWorkspace();
public int UpdateWorkspace()
{
// Check if user has read permissions.
CheckWorkspacePermissions();
// Update the workspace with most recent version of the project files from the repository.
GetStatus status = workspace.Get();
Console.Write("Conflicts from checkout: ");
Console.WriteLine(status.NumConflicts);
return status.NumConflicts;
}
I'm clueless. The documentation for these .NET libraries is practically non-existent so i have no idea why this isn't working.
EDIT: Seems it started working after i did a refactoring of my code. The existence of conflicts also plays a role in things not working, sometimes.