TFS & Visual Studio ALM – by Neno Loje

(formerly Team System, VSTS)

How to compile projects that reference Microsoft.Office.Interop assemblies with a build server

February 13th, 2014 · No Comments · Team Foundation Build (TF Build)

The Problem

A project that references Office interop assemblies (Microsoft.Office.Interop) fails to compile on TF Build (or VSO’s Elastic Build Service).

The error message might be similar to this one:

The type or namespace name ‘Office’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)

The Solution (based on this forum post)

You want to check-in the interop assemblies.

  1. Create a “Lib” folder and add all relevant assemblies, like:
    • Microsoft.Office.Interop.Word.dll
    • Microsoft.Office.Interop.Excel.dll
    • Microsoft.Vbe.Interop.dll
    • OFFICE.DLL
  2. Removed the references to your Office interop assemblies and add references to the assemblies in your libs folder.

–Neno

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

*