我正在尝试为我的一个引用 Microsoft ActiveX 数据对象 (MDAC 2.8) 的项目生成主互操作程序集。通过 Visual Studio 中的“引用”对话框添加此库会将 Interop.ADOR.dll 文件添加到解决方案的 bin 目录中。
但是,当我运行 tlbimp.exe 时出现错误:
C:\Solution> tlbimp Component.dll /out: My.Interop.Component.dll /keyfile:myKeyFile
.snk /primary
Microsoft (R) .NET Framework Type Library to Assembly Converter 3.5.30729.1
Copyright (C) Microsoft Corporation. All rights reserved.
TlbImp : error TI0000 : System.ApplicationException - Referenced type library 'A
DOR' does not have a primary interop assembly registered.
我在网上找不到任何东西,这很奇怪。有任何想法吗?