添加参考 [英] Adding a reference

查看:82
本文介绍了添加参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2015中的VB。 我已经安装了MS Office 2016.在参考资料中我可以看到'Microsoft Excel 16.0对象库',但是当我尝试添加它时,我收到消息"对Microsoft Excel 16.0对象库的引用可能不是
加上。我在做什么?

I use VB from Visual Studio 2015.  I have installed MS Office 2016. In the references I can see 'Microsoft Excel 16.0 object library', but when I try to add it, I get the message "A reference to Microsoft Excel 16.0 object library could not be added. What am I miussing?

推荐答案

 听起来像你可能遇到32位/ 64位的问题。 例如,您可能已安装(x86)32位版本的MS Office,而您的vb.net应用程序的目标是(x64)64位操作系统, 或者反之亦然。

 Sounds to me like you might be having a 32bit/64bit problem.  For example, you may have installed the (x86) 32bit version of MS Office and your vb.net application is targeting a (x64) 64bit OS,  or maybe visa-versa.

 您可以尝试将应用程序更改为以(x86)32位平台为目标。 您可以在应用程序的属性页面中执行此操作, 在
编译标签上,如下所示...

 You can try changing your application to target the (x86) 32bit platform.  You can do that in your application's properties page,  on the Compile tab as seen below...

 

 主要观点是, 确保您的目标版本与您安装的MS Office版本相同。

 Main point being,  make sure you target the same version as the MS Office version you installed.


这篇关于添加参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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