title: Element is not declared validation error post upgrading from .Net v4.5 to .Net v4.5.2
body: <p>I understand that there are already many existing threads for the 'element not found' error for XML validation but I'm posting this as my problem is slightly different.</p>
  
  <p>My code was running fine until it was on .Net v4.5. After upgrading the framework to v4.6.1, I started getting this error for each XML element in my xml file. Upon downgrading I found that the error started occurring from .Net framework v4.5.2 onwards. Below is my code:</p>
  
  <p><strong>XML</strong> - Book.xml</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;!DOCTYPE book SYSTEM "Book.dtd"&gt;
  &lt;book&gt;
      &lt;title&gt;The Lord of the Rings&lt;/title&gt;
      &lt;author&gt;J.R.R. Tolkien&lt;/author&gt;
      &lt;isbn&gt;1572810556&lt;/isbn&gt;
  &lt;/book&gt;
  </code></pre>
  
  <p><strong>DTD</strong> - Book.dtd</p>
  
  <pre><code>&lt;!ELEMENT book (title, author, isbn)&gt;
  &lt;!ELEMENT title (#PCDATA)&gt;
  &lt;!ELEMENT author (#PCDATA)&gt;
  &lt;!ELEMENT isbn (#PCDATA)&gt;
  </code></pre>
  
  <p><strong>C# Functions</strong></p>
  
  <pre><code>public static void ReadXMLwithDTD()
  {
      // Set the validation settings.
      XmlReaderSettings settings = new XmlReaderSettings();
      settings.ValidationType = ValidationType.DTD;
      settings.DtdProcessing = DtdProcessing.Parse;
      settings.ValidationEventHandler += new ValidationEventHandler(ValidationCallBack);
      settings.IgnoreWhitespace = true;
  
      // Create the XmlReader object.
      XmlReader reader = XmlReader.Create("Book.xml", settings);
  
      // Parse the file.
      while (reader.Read())
      {
          Console.WriteLine("{0}, {1}: {2} ", reader.NodeType, reader.Name, reader.Value);
      }
  }
  
  private static void ValidationCallBack(object sender, ValidationEventArgs e)
  {
      if (e.Severity == XmlSeverityType.Warning)
          Console.WriteLine("Warning: Matching schema not found.  No validation occurred." + e.Message);
      else // Error
          Console.WriteLine("Validation error: " + e.Message);
  }
  </code></pre>
  
  <p>When run the code the callback throws validation errors (element not found) for all four XML elements - book, title, author and isbn.</p>
  
  <p>Any help to fix this will be appreciated.</p>
  
  <p>Thanks,</p>