在VS .NET 2005中添加参考Word/Excel/Ppt/Visio 11.0.0.0 [英] Add Reference Word/Excel/Ppt/Visio 11.0.0.0 in VS .NET 2005

查看:58
本文介绍了在VS .NET 2005中添加参考Word/Excel/Ppt/Visio 11.0.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个C#.Net应用程序,它将打开Word文档.

I'm writing a C#.Net app which will open a Word Document.

我的计算机上装有Office 2003和2007,并且在我的项目中指的是"Microsoft Word/Excel对象库11"组件.但是路径显示为c:\ windows \ assembly \ gac \ 12.0.0.0 ..文件夹.因此,默认情况下始终将其引用为MS Word 2007.

I have Office 2003 and 2007 on my machine and I am referring to 'Microsoft Word/Excel Object Library 11' component in my project.  But the Path shows as c:\windows\assembly\gac\12.0.0.0.. folder.  Because of which by default it is always referred to MS Word 2007.

在解决方案资源管理器"视图中,我看到单词引用"的属性设置为:
Microsoft.Office.Interop.Word:
描述:Microsoft Excel 11.0对象库
路径:C :\ WINDOWS \ assembly \ GAC \ Microsoft.Office.Interop.Word \ 12.0.0.0__71e9bce111e9429c \ Microsoft.Office.Interop.Word.dll

In the Solution Explorer view, I see the properties for the Word Reference set to:
Microsoft.Office.Interop.Word :
Description:Microsoft Excel 11.0 Object Library
Path: C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Word\12.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll

是说它是Word 11,但随后引用了上面的Word 12互操作库.我已经删除了引用并再次添加了它,它仍然相同.

It's saying it's Word 11, but then references the Word 12 interop libraries, above. I've removed the reference and added it again and it's still the same.

关于如何解决此问题的任何建议?我想参考与该项目中的2003文件相关的MS Office 11.0.0.0.但是如前所述,这两个版本都应该在运行应用程序的服务器上存在.

Any suggestions as to how I fix this? I want to refer to MS Office 11.0.0.0 for 2003 files related files in the project.  But as mentioned, both versions should be present on the server where application is running.

反应迅速.

谢谢.

推荐答案

这是因为在开发人员框中安装了Office 2007的主要互操作程序集,主要互操作程序集具有绑定重定向. .
This is because you have Primary Interop Assemblies for Office 2007 installed on the developer box, the Primary Interop Assemblies have Binding redirection.


这篇关于在VS .NET 2005中添加参考Word/Excel/Ppt/Visio 11.0.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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