Merge pull request #901 from Blewzman/FixAggregateExceptionGetBaseException
[mono.git] / mcs / class / Microsoft.Build / Microsoft.Build.Evaluation / Project.cs
index 7a1c1144d207c52781ce974885e55bf17cf1fcab..7f2e9b29d4d22e2b5655a6da34a9e7c6236a6b0c 100644 (file)
@@ -255,8 +255,9 @@ namespace Microsoft.Build.Evaluation
                                var ige = child as ProjectImportGroupElement;
                                if (ige != null && Evaluate (ige.Condition)) {
                                        foreach (var incc in ige.Imports) {
-                                               foreach (var e in Import (incc))
-                                                       yield return e;
+                                               if (Evaluate (incc.Condition))
+                                                       foreach (var e in Import (incc))
+                                                               yield return e;
                                        }
                                }
                                var inc = child as ProjectImportElement;