469,954 Members | 1,891 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

Interop Reference Problem

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\Datab aseControlsImplementation.cs(13):
The type or namespace name 'Office' does not exist in the class or namespace
'Microsoft' (are you missing an assembly reference?)

Nov 17 '05 #1
1 8253
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

"Steve B." wrote:
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\Datab aseControlsImplementation.cs(13):
The type or namespace name 'Office' does not exist in the class or namespace
'Microsoft' (are you missing an assembly reference?)

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by roy | last post: by
reply views Thread by roy | last post: by
1 post views Thread by Mauro | last post: by
8 posts views Thread by Rob Edwards | last post: by
reply views Thread by Tina | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.