在生成服务器的Microsoft.Office.Interop.Excel参考 [英] Microsoft.Office.Interop.Excel Reference in Build Server

查看:124
本文介绍了在生成服务器的Microsoft.Office.Interop.Excel参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Windows服务应用程序创建Excel报表的Microsoft.Office.Interop.Excel参考。该应用程序在开发计算机建立罚款,但在构建机器失败说,类型或命名空间名称'办公室'不命名空间'微软'(是否缺少程序集引用?)存在

I'm using Microsoft.Office.Interop.Excel reference in the windows service application to create excel reports. The application builds fine in DEV machine but in the build machine it fails saying "The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)".

它在开发计算机,因为已经安装了MS Excel 2010中的工作。但是,在构建服务器,MS Excel中没有安装。

It's working in DEV machine because, MS Excel 2010 is already installed. But in build server, MS Excel is not installed.

我的问题是,在构建服务器安装MS Excel是强制性的构建成功或者我可以复制Microsoft.Office.Interop.Excel.dll在我的项目文件夹,引用它和办理登机手续的构建。目前,该dll引用添加应用程序指向组件(GAC)。

My question is whether, installing MS Excel in build server is mandatory for the build to succeed or can i copy the Microsoft.Office.Interop.Excel.dll in my project folders, reference it and check-in for the build. Currently, the dll reference added in the application points to assembly(GAC).

另一件事去知道的是,这些互操作DLL的没有被重新分配,因为它们是MS_Office产品的一部分。

Another thing go to know is that, these interop dll's are not re-distributable as they are part of MS_Office product.

请给我建议在这方面正确的做法。

Please suggest me the right approach in this regard.

推荐答案

您需要安装在构建服务器MS Excel还。互操作DLL不能正常工作,而不Excel的本身是present。

You need to have MS Excel installed on the build server also. Interop DLL cannot function without Excel itself being present.

有关Office开发的详细信息,您可以参考上的 MSDN

For more details on Office development, you can refer the official documentation on MSDN.

这篇关于在生成服务器的Microsoft.Office.Interop.Excel参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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