[xbuild] Handle a repeat build of a target, when building through ..
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Project.cs
index 33aad3dea63adebda939e6604a84411ba36560dc..b4ed8562382595c92f99c2b474a5c9ecc4043757 100644 (file)
@@ -374,10 +374,8 @@ namespace Microsoft.Build.BuildEngine {
                                return false;
 
                        ITaskItem[] outputs;
-                       if (ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs)) {
-                               if (targetOutputs != null)
-                                       targetOutputs.Add (target_name, outputs);
-                       }
+                       if (targetOutputs != null && ParentEngine.BuiltTargetsOutputByName.TryGetValue (key, out outputs))
+                               targetOutputs [target_name] = outputs;
                        return true;
                }