I'm having issues with getting my C# solution to build on my build server. Basically, we have a Continuous Integration box running Jenkins. I have a job in Jenkins that uses MSBuild to build my solution. When attempting to build, MSBuild reports unknown or missing assembly references.
error CS0234: The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
error CS0246: The type or namespace name 'Worksheet' could not be found (are you missing a using directive or an assembly reference?)
My solution has a feature that utilizes some objects from Excel.
The question is, do I really have to install Microsoft Office, in order for my build server to simply be able to build the solution? The build server will not be using my application, I just need it to build my solution.
I've read similar posts here on StackOverflow with the same problem, but there seems to be multiple conflicting answers saying "Yes, you must have Office installed". While other answers say "No, you can just install the PIA redistributable."
Examples::
What reference do I need to use Microsoft.Office.Interop.Excel in .NET?
Microsoft.Office.Interop.Excel Reference in Build Server
Is it necessary for the build machine to have Microsoft Office 2007 installed?
How to use Microsoft.Office.Interop.Excel on a machine without installed MS Office?
On the server, I've gone through the process of downloading/installing the Primary Interop Assemblies Redistributable found here::
http://www.microsoft.com/en-us/download/details.aspx?id=3508
But that didn't fix anything.
Of course, the solution builds just fine on our development machines, because we all have Microsoft Office installed on them.
Surely we won't have to acquire another Microsoft Office license and install it on our build server, in order to simply build our solution, right? Or will we?
Thanks for reading.