Search code examples
vb.netmsbuildteamcityoffice-pia

Microsoft Office PIA and how to reference and build correctly from WebApp


I am currently trying to build on TeamCity, which uses Microsoft.Office.Interop dll. This will build and work fine locally as I have Office installed, however when trying to build it on TeamCity it fails as it has no reference.

I can't install the PIA distributable as I get an error message saying the Office 2003 is required to be installed. I don't want to install Office on the server.

Is there any way to get around this?


Solution

  • If all the teamcity server is doing is a build, then add the Microsoft.Office.Interop DLL to a References folder for your project, and then configure your project to look in that references folder.

    However, if the TeamCity server is also running tests that use Office Interop, then you will run into problems unless you have Office installed on the machine running the tests.