类型库导入器在类型验证期间遇到错误
我正在编写一个 C# 应用程序,其中有多个 COM 引用。当我尝试构建它时,其中一些出现以下错误:
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1418,9):错误 MSB3303:无法解析 COM 引用“70850f66-869f-44a0-88e7-b0460a7e3bf3”版本 0.1 。类型库导入器在类型验证期间遇到错误。尝试在没有类成员的情况下导入。
该应用程序仍然构建并成功运行。
此错误消息是什么意思?我该如何修复它?
I am writing a C# application which has several COM references. When I attempt to build it I get the following error for some of them:
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1418,9): error MSB3303: Could not resolve COM reference "70850f66-869f-44a0-88e7-b0460a7e3bf3" version 0.1. The type library importer encountered an error during type verification. Try importing without class members.
The application is still built and runs successfully.
What does this error message mean, and how can I fix it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过亲自对有问题的文件运行
TlbImp
,我能够确定错误的原因。TlbImp
位于类似以下位置:我针对编译 COM DLL 时生成的 TLB 文件运行了它,并且收到了比 Visual Studio 告诉我的更详细的错误消息。
By running
TlbImp
myself on the offending files I was able to determine the cause of the error.TlbImp
is located somewhere like:I ran it against the TLB file that was generated when I compiled my COM DLL, and I received a more detailed error message than what Visual Studio had told me.
运行命令行,在管理模式下执行 tblimp 工具 - 它帮助了我
Run command line from which you execute tblimp tool in Admin mode - it helped me