views:

25

answers:

1

Hi There! I'm about to go crazy with this problem!

  1. I created a new server on a virtual machine for TFS.

  2. I have created a new Build Definition, that when a solution is checked in from my local machine TFS is to build my solution using the default build process template.

  3. On the TFS machine and my local machine I have MS Office 2010 and .Net framework 4.0 Installed.

  4. In my project I have a reference to Microsoft.Office.Interop, etc...

  5. This all build fine on my local machine.

The problem occurs when the build definition is triggered. The build is run and does it's stuff for a while until it gets to the Microsoft assembly references.

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

  • The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)

  • ETC

The references paths point to the GAC, in case that matters.

Help would be awesome, and you would therefore be awesome by extension.

Regards, Byron Cobb.

+2  A: 

Byron,

If you take the assemblies from the compiled version on your computer create a libs folder at your solution level, then add the dlls for

  1. Microsoft.Office.Interop.Word.dll
  2. Microsoft.Office.Interop.Excel.dll
  3. Microsoft.Vbe.Interop.dll
  4. OFFICE.DLL

Into the libs folder, then remove the reference to your Office Interop and add references to the following assembies in you libs folder, should work a treat, we build without office on our build server.

Regards

Iain

Iain
Thanks Iain! I find that there are no powerpoint interop dlls created when I build my local version. Is the powerpoint assembly part of one of the other dlls?
Byron Cobb
I ended up going to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA and getting the dlls out of there
Byron Cobb
No worries, Office Interop has been the bane of my life
Iain