dougajmcdonald
dougajmcdonald

Reputation: 20057

TFS Build where tests rely on office interop

I have a project which contains unit tests which depend on using office interop to mimic the opening and closing of files, post generation.

I am moving this project into an automated TFS build and at the moment it's failing on those tests saying:

LiveImportExportComparisonTests.cs (1): The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

By default we won't have office installed on our build agent boxes and ideally I'd like to avoid this.

Does anyone know if simply installing the Primary Interop Assemblies (PIA) from microsoft would cover the requirement for the Office namespace? or do we really need to install office on the build agents?

Upvotes: 0

Views: 234

Answers (1)

Rolf Huisman
Rolf Huisman

Reputation: 1437

For compiling you don't need office, but for testing you need to install office on the buildserver, which is the same bit version (x64 or x86) as the tooling you are compiled and run test for.

Upvotes: 1

Related Questions