title: Visual Studio: Cannot find the interop type that matches the embedded type 'DOMDocument'. Are you missing an assembly reference?
body: <p>Recently I've been unable to build my project at work because of the following error: </p>
  
  <blockquote>
    <p>Cannot find the interop type that matches the embedded type
    'DOMDocument'. Are you missing an assembly reference?</p>
  </blockquote>
  
  <p>To be honest I'm not really sure how to approach the error, nor can I fiqure out what's wrong. It's giving me the file that is the cause, that has these import statements at the top:</p>
  
  <pre><code>Imports X.Online.Core
  Imports X.Online.Connectivity
  Imports X.Online.Classes
  Imports Microsoft.VisualBasic
  Imports System.ComponentModel
  Imports System.Web
  Imports X.Asp.Classes
  Imports X.Asp.Core
  Imports X.Asp.SiteSpecific
  Imports MSXML2
  Imports X.Online.State
  Imports Elmah
  </code></pre>
  
  <p>From what I can gather, it seems to be that I'm missing something, and I've had a look and at first I thought it was a missing MSXML2, but it appears in my references as "Interop.MSXML2" so now I'm not sure that's the problem. I should add that this problem appeared after upgrading to Windows 10 from Windows 7. </p>
  
  <p>I've also read the advice listed here: <a href="https://blogs.msdn.microsoft.com/vbteam/2010/06/11/troubleshooting-errors-when-embedding-type-information-doug-rothaus/" rel="nofollow">https://blogs.msdn.microsoft.com/vbteam/2010/06/11/troubleshooting-errors-when-embedding-type-information-doug-rothaus/</a></p>
  
  <p>And I've also tried repairing my .net 4 installation.</p>
  
  <p>I would be very grateful if someone could offer some advice as to how I can go about fixing this error!</p>