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

  • Question

  • Our Visual Studio 2010 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? I don't want to run the app on the build machine - only build the exe. Installing Office 2007 on the build machine seems like hitting the problem with a sledgehammer.

    Is there some other way around this?

    Friday, February 17, 2012 2:14 AM

Answers

  • On dev machine get all those interop dlls and add them to project as files (or to solution items to keep project clean). Then reference them from your project by not using .net tab, but Browse and select them from disk from your solution's directory.

    • Marked as answer by GaryBarrett Friday, February 17, 2012 11:37 AM
    Friday, February 17, 2012 11:10 AM

All replies

  • On dev machine get all those interop dlls and add them to project as files (or to solution items to keep project clean). Then reference them from your project by not using .net tab, but Browse and select them from disk from your solution's directory.

    • Marked as answer by GaryBarrett Friday, February 17, 2012 11:37 AM
    Friday, February 17, 2012 11:10 AM
  • Thanks Damian, that worked!
    Friday, February 17, 2012 11:37 AM