The type library importer encountered an error during type verification

…衆ロ難τιáo~ 提交于 2019-12-22 07:05:42

问题


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?


回答1:


By running TlbImp myself on the offending files I was able to determine the cause of the error. TlbImp is located somewhere like:

C:\Program Files\Microsoft SDKs\Windows\v6.1\TlbImp.exe

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.




回答2:


Run command line from which you execute tblimp tool in Admin mode - it helped me



来源:https://stackoverflow.com/questions/1680882/the-type-library-importer-encountered-an-error-during-type-verification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!