title: System.NullReferenceException when reading Work Items from Changeset
body: <p>I have been writing a tool in c# that will produce a html report on the changesets and work items associated with builds in between certain dates. The report also includes links for the Changesets and Work Items using a method described in this <a href="https://stackoverflow.com/questions/6466441/how-to-map-a-tfs-item-url-to-something-viewable">question</a>. When I run the tool, I don't get any problems, but I have given it to some others to test and there are some mixed results. Some are able to run the tool with no problems, but others are getting errors when they run it on machines that do not have TFS 2010 installed. The error message in question is</p>
  
  <pre><code>System.NullReferenceException: Object reference not set to an instance of an object at Microsoft.TeamFoundation.VersionControl.Client.Changeset.get_WorkItems()
  </code></pre>
  
  <p>From testing on such machines, I have found that my tool connects to TFS without issue and can also read the Chageset items without issue, but when it comes to get details for the Work Items associated with the changesets, the error occurs. The code to get the Work Items to loop around is</p>
  
  <pre><code>WorkItem[] csWorkItems = changeSet.WorkItems;
  </code></pre>
  
  <p>I'm rather confused as to why this causes an error on machines that do not have TFS 2010 installed. Also, I have had a look at the report on these machines, and the links to the changesets and work items work correctly! </p>
  
  <p>Can anyone give me a reason why this doesn't work and how to fix it, or maybe give me an alternative to the way i get can the Work Item objects without causing this error?</p>