构建计算机是否必须安装Microsoft Office 2007? [英] Is it necessary for the build machine to have Microsoft Office 2007 installed?

查看:117
本文介绍了构建计算机是否必须安装Microsoft Office 2007?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序添加了功能,以允许用户从excel电子表格中导入某些信息(所有用户都已经拥有Office 2007).

Our app added functionality to allow users to import certain information from an excel spreadsheet (all users will have Office 2007 already).

开发机器具有Office 2007,开发人员添加了对Microsoft.Office.Interop.Excel的引用-一切都很好.

The development machine has Office 2007 and the developer added a reference to Microsoft.Office.Interop.Excel - all was good.

但是,生成计算机未安装Office 2007.在构建计算机上运行该构建时,会出现以下构建错误:名称空间'Microsoft'中不存在类型或名称空间名称'Office'(您是否缺少程序集引用?)"

However, the build machine does not have Office 2007 installed. When the build is run on the build machine, we get the following build error: "The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)"

我确实下载了可再发行的Office 2007主互操作程序.但是,当我在构建计算机上运行该msi时,出现一个消息框,提示请在安装此产品之前安装Microsoft Office 2007"

I did download the Office 2007 Primary Interop Assemblies redistributable. But when I run that msi on the build machine, I get a messagebox saying "Please Install Microsoft Office 2007 before installing this product"

真的需要在生成计算机上安装Office 2007吗?还有其他解决方法吗?

Is it really necessary to install Office 2007 on the build machine? Is there some other way around this?

推荐答案

确保已使用源代码签入Microsoft.Office.Interop.Excel程序集,并且VS项目从源树而不是从GAC引用了它.

Make sure the Microsoft.Office.Interop.Excel assembly is checked-in with the source code and the VS project is referencing it from the source tree and not from GAC.

完成此操作后,肯定不需要在构建计算机上安装MS Office,但需要它才能使应用程序运行.

After that is done, surely you do not need MS Office to be installed on the build machine, but you would need it for the application to run.

这篇关于构建计算机是否必须安装Microsoft Office 2007?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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