private void GetAllReferenceProperties(List <MSBProject> projects) { if (_allFoundProperties.Count() > 0) { var props = (ICollection <KeyValuePair <String, ReferencedProperty> >)_allFoundProperties; props.Clear(); } //Parallel.ForEach(projects, proj => // Unstable. Throws exceptions from deep in the microsoft layer foreach (MSBProject proj in projects) { GetPropertiesFor(proj); } // This can only be called after the properties are crossed referenced. foreach (var pair in _allFoundProperties) { pair.Value.GetPropertyValues(); } }