title: TFS 2010 Work Item is not ready to save but there are no validation items
body: <p>I'm trying to save a TFS Work Item programmatically but always get the exception:</p>
  
  <pre><code>TF237124: Work Item is not ready to save
  </code></pre>
  
  <p>Now, I understand what this is telling me - that the Work Item is missing a required field or similar - and my code is anticipating this by calling:</p>
  
  <pre><code>ArrayList ValidationResult = wi.Validate(); 
  </code></pre>
  
  <p>before the save. However my ArrayList contains no elements following this call.</p>
  
  <p>I've tried logging in to the TFS web interface using the same credentials and creating a Work Item that way which works fine.</p>
  
  <p>How can I discover why my Work Item won't save? Here's my code:</p>
  
  <pre><code>// get a reference to the team project collection (authenticate as generic service account)
          using (var tfs = new TfsTeamProjectCollection(tfsuri, new System.Net.NetworkCredential("My_User", "password")))
          {
              tfs.EnsureAuthenticated();
              var workItemStore = GetWorkItemStore(tfs);
  
               // create a new work item
               WorkItem wi = new WorkItem(GetWorkItemType(type, workItemStore));
               {
                  //Values are supplied as a KVP - Field Name/Value
                  foreach (KeyValuePair&lt;string,string&gt; kvp in values)
                  {
                     if (wi.Fields.Contains(kvp.Key))
                     {
                        wi.Fields[kvp.Key].Value = kvp.Value;
                     }
                  }   
  
                  ValidationResult = wi.Validate();                       
                }
  
                if (ValidationResult.Count == 0)
                {
                   wi.State = wi.GetNextState("Microsoft.VSTS.Actions.Checkin");
                   wi.Save();
                   return wi.Id;
                }
                else
                { 
                   return 0;
                }
              }
          }
  </code></pre>