Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it necessary for the build machine to have Microsoft Office 2007 installed?

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

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

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?)"

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"

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

like image 479
Gary Barrett Avatar asked Feb 03 '23 08:02

Gary Barrett


2 Answers

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.

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.

like image 122
Davide Piras Avatar answered Feb 04 '23 23:02

Davide Piras


Just ask your devs to check all dll dependencies. This is a clear case of "it works on my machine" where you need to drag the devs to the machine where it is not working and point out that their documentation is lacking in the "dependencies department". If you have access to the source code or can run ILSpy on the assemblies you can propably track this down yourselve.

Safe bet is that yo just install Excel, but this is hitting the problem with a sledge hammer. Your devs SHOULD know what is really needed.....

like image 32
LarsWA Avatar answered Feb 04 '23 22:02

LarsWA