Merge pull request #4540 from kumpera/android-changes-part1
[mono.git] / mcs / class / Microsoft.Build / Microsoft.Build.Construction / ProjectWhenElement.cs
index 68040f52c210fa55a53eeb58331fda86c0925304..0d7331afcbfdee8b32467ad2e67957295e461b7c 100644 (file)
@@ -29,6 +29,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Xml;
 using Microsoft.Build.Exceptions;
 using Microsoft.Build.Internal;
 
@@ -57,9 +58,9 @@ namespace Microsoft.Build.Construction
                 internal override string XmlName {
                         get { return "When"; }
                 }
-                internal override ProjectElement LoadChildElement (string name)
+                internal override ProjectElement LoadChildElement (XmlReader reader)
                 {
-                        switch (name) {
+                        switch (reader.LocalName) {
                         case "PropertyGroup":
                                 var property = ContainingProject.CreatePropertyGroupElement ();
                                 AppendChild (property);
@@ -74,7 +75,7 @@ namespace Microsoft.Build.Construction
                                 return when;
                         default:
                                 throw new InvalidProjectFileException (string.Format (
-                                        "Child \"{0}\" is not a known node type.", name));
+                                        "Child \"{0}\" is not a known node type.", reader.LocalName));
                         }
                 }
         }