-4

when i run to

 BranchHistoryTreeItem[][] TreeItem = vcs.GetBranchHistory(new ItemSpec[] { new                                     
 ItemSpec(teamProject.ServerItem, RecursionType.Full) }, LatestVersionSpec.Latest);

there are a issue "Object reference not set to an instance of an object." but BranchHistoryTreeItem[][] has declared TreeItem...

2 Answers2

1

Its not the TreeItem which is null, it could be vcs or teamProject which is null. Put a break point and hover over vcs or teamProject and see which is null.

Habib
  • 219,104
  • 29
  • 407
  • 436
0

Your vcs probabbly is Null or it's teamProject, don't see any other possibility.

Check it out.

Debug the program.

Tigran
  • 61,654
  • 8
  • 86
  • 123