Search code examples
.net-4.0tfs-sdk

Workspace.PendEdit not checking out files


I'm using the TFS 2010 SDK to programmatically check in edits to files into TFS 2010. The documentation on the TFS 2010 SDK is sparse at best. When I call the method workspace.pendedit() passing in an array of files I want to mark as having a pending edit, nothing is actually checked out. So when I call workspace.checkin() passing in workspace.getpendingchanges and some comments I get an exception that there must be at least one thing that has a pending change (which should be what I passed into pendedit). Any thoughts on why the app isn't marking the files as having a pending edit in the workspace?


Solution

  • It turned out that even though I had added the files and checked in the files, it seemed that the workspace didn't recognize that the files were there, and as a result I had to do a Get() prior to the PendEdit()