.net - Visual Studio : Cannot find the interop type that matches the embedded type 'DOMDocument' . 您是否缺少程序集引用?

标签 .net visual-studio-2013

最近由于以下错误,我无法在工作中构建我的项目:

Cannot find the interop type that matches the embedded type 'DOMDocument'. Are you missing an assembly reference?



老实说,我不太确定如何处理错误,也无法找出问题所在。它给了我一个文件,它在顶部有这些导入语句:
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

据我所知,似乎我遗漏了一些东西,我看了看,起初我认为它是一个丢失的 MSXML2,但它在我的引用文献中显示为“Interop.MSXML2”,所以现在我我不确定那是问题所在。我应该补充一点,这个问题是在从 Windows 7 升级到 Windows 10 后出现的。

我还阅读了此处列出的建议:https://blogs.msdn.microsoft.com/vbteam/2010/06/11/troubleshooting-errors-when-embedding-type-information-doug-rothaus/

而且我还尝试修复我的 .net 4 安装。

如果有人可以就我如何解决此错误提供一些建议,我将不胜感激!

最佳答案

只是为了让人们知道,如果其他人有过类似的问题。我的问题似乎是 Visual Studio 为两个项目导入了互操作文件,但两个项目都链接到了 .dll 的单独版本。我删除了它们并确保添加对完全相同文件的引用,这解决了我的问题。

关于.net - Visual Studio : Cannot find the interop type that matches the embedded type 'DOMDocument' . 您是否缺少程序集引用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37006701/

相关文章:

.net - 如何指定正确的列?

c# - 如何创建用于属性网格的自定义集合编辑器表单?

c# - 使用 LINQ 在 XML 中的特定位置插入特定的 XElement

使用 Jasmine 的 TypeScript 中的 AngularJS 单元测试未运行

c++ - 获取符号链接(symbolic link)目标卷名的最佳方法 [NTFS]

c# - Visual Studio 2013 不接受大写 E

c# - 阻塞 ForEach 直到异步事件完成

c# - 重置 Visual Studio 的实验实例

visual-studio-2013 - Visual Studio 2013 更新 3 个问题

c++ - 将依赖项添加到安装项目 Win32 应用程序 Visual Studio