VS 2012.3引用MS Access COM DLL,无法解析COM引用错误 [英] VS 2012.3 Referencing MS Access COM DLL, could not resolve COM reference error

查看:831
本文介绍了VS 2012.3引用MS Access COM DLL,无法解析COM引用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在VS2012.3(32位exe)中创建了一个新的控制台项目,并添加了一个COM类型库引用Microsoft Access(我试过2003年和2007年)。 添加引用对话框中显示的Microsoft Access引用没有问题。但是,在关闭对话框VS时,会在两个新添加的引用上显示一个黄色三角形叠加层,并得到以下生成错误:

I created a new Console project in VS2012.3 (32bit exe) and added a COM Type Library reference to Microsoft Access (I tried both 2003 and 2007). The "Microsoft Access" reference shows up in the Add Reference dialog no problem. However, upon closing that dialog VS displays a yellow triangle overlay on the two newly added references, and I get the following build error:


不解析COM参考4affc9a0-5f99-101b-af4e-00aa003f0f07
版本9.0。对象引用未设置为对象的实例。

Could not resolve COM reference "4affc9a0-5f99-101b-af4e-00aa003f0f07" version 9.0. Object reference not set to an instance of an object.

我的同事能够在他们的计算机上没有问题。所以我试图找出什么可能是我的机器的问题。

My colleagues are able to do this with no problem on their computer. So I'm trying to figure out what could be the problem with my machine. I'm running Windows 8.1, whereas others are running a mix of Windows 8.0 and 7. Any ideas?

更新 - 某些屏幕截图:

< img src =https://i.stack.imgur.com/xFPv1.pngalt =添加参考对话框>

推荐答案

问题解决:
我在这里找到了解决方案: http://support.microsoft.com/kb/823996

我所有的要做的是打开开发人员命令提示符VS2012,向下导航到GAC的ADODB文件夹,然后运行 regasm.exe ADODB.dll 。这固定了整个问题。

Problem Solved: I found the solution here: http://support.microsoft.com/kb/823996.
All I had to do was open the "Developer Command Prompt for VS2012", navigate down to the GAC's ADODB folder, then run regasm.exe ADODB.dll. That fixed the entire problem.

问题解决:

Problem solved:

这篇关于VS 2012.3引用MS Access COM DLL,无法解析COM引用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆