构建机器是否需要安装Microsoft Office 2007? [英] Is it necessary for the build machine to have Microsoft Office 2007 installed?

查看:22
本文介绍了构建机器是否需要安装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 Primary Interop Assemblies redistributable.但是当我在构建机器上运行那个 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天全站免登陆