Interop Reference Problem

G

Guest

Why does Office create a compile error when doing a Release compile but not
when doing a Debug complie. Release compile is compiled to the network share
drive

- Excel Interop is added as a reference in the VS Project window.
- Excel PIA Interop is located on the same network location as the exe and
the share directory with PIA is included in the project path
- Other projects in the same solution also reference Office with no problem

Compile Error:
using Excel = Microsoft.Office.Interop.Excel;

C:\BusinessInformationSoftware\ADONetLibrary\DatabaseControlsImplementation.cs(13):
The type or namespace name 'Office' does not exist in the class or namespace
'Microsoft' (are you missing an assembly reference?)
 
G

Guest

I solved it but im even more confused

the knowledgebase says interop assemblies for my simple local application
has to be in the same directory as the exe (a directory on the share, call it
L:\Foo). But the other project of my solution reference Interop Assemblies
in a subdirectory (L:\Foo\PIA) . So i changed the reference and obtained the
Excel dll of that one project giving compile errors to that subdirectory and
it compiled fine.

Now I have PIA's in L:\Foo because the program won't load with out them
there (I learned that lesson) but there referenced from L:\Foo\PIA

Hmmm
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top