473,394 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Broken References

I created an Excel Automation Windows Application (VB.Net 2003) and it
works on the development machine fine.

However when I run it on another machine I get this error:

System.IO.FileNotFoundException: File or assembly name
Microsoft.Office.Interop.Excel, or one of its dependencies, was not
found.

File name: "Microsoft.Office.Interop.Excel"

Both machines have Excel 2003 installed, and I have a reference set to
Excel 11.0.

Feb 15 '06 #1
7 1860
Could anyone provide any guidance?

Feb 15 '06 #2
"Bill Schanks" <ws******@gmail.com> schrieb
I created an Excel Automation Windows Application (VB.Net 2003) and
it works on the development machine fine.

However when I run it on another machine I get this error:

System.IO.FileNotFoundException: File or assembly name
Microsoft.Office.Interop.Excel, or one of its dependencies, was not
found.

File name: "Microsoft.Office.Interop.Excel"

Both machines have Excel 2003 installed, and I have a reference set
to Excel 11.0.

Is the file mentioned there?

I've never done it and didn't read it completely, but this might help:
http://msdn.microsoft.com/library/de...dc_oxppias.asp

If not, search for "PIA" (primary interop assemblies) and "deploy".
Armin

Feb 15 '06 #3
It seems like too much to have the end users having to install the PIA.

In my project I don't have 'Imports Microsoft.Office.Core'. I just have
a reference set to Excel 11.0. I will add it to see if that solves the
problem.

What started me on this project was some sample code from MS on excel
automation. In there the code was:

dim xlApp as new excel.application

I had to make it:

dim xlApp as new Microsoft.Office.Interop.Excel.Application().

Shouldn't excel.application work? I'm fine using the fully qualified
name it just seems like sample code should work once the references are
correctly set.

Feb 15 '06 #4
"Bill Schanks" <ws******@gmail.com> schrieb
It seems like too much to have the end users having to install the
PIA.
You're using them in the project, thus you will need them. (maybe there are
exceptions I haven't heard of (see
microsoft.public.dotnet.framework.interop))
In my project I don't have 'Imports Microsoft.Office.Core'. I just
have a reference set to Excel 11.0. I will add it to see if that
solves the problem.
Importing a namespace doesn't solve it. It only saves you from typing the
full qualified name in the code.
What started me on this project was some sample code from MS on
excel automation. In there the code was:

dim xlApp as new excel.application

I had to make it:

dim xlApp as new Microsoft.Office.Interop.Excel.Application().

Shouldn't excel.application work? I'm fine using the fully qualified
name it just seems like sample code should work once the references
are correctly set.


If you import Microsoft.Office.Interop at project level or file level, you
don't have to type the FQN. That's what they probably assumed in the sample
code.
Armin

Feb 16 '06 #5
"Bill Schanks" wrote in message
I created an Excel Automation Windows Application (VB.Net 2003) and it
works on the development machine fine.

However when I run it on another machine I get this error:

System.IO.FileNotFoundException: File or assembly name
Microsoft.Office.Interop.Excel, or one of its dependencies, was not
found.

File name: "Microsoft.Office.Interop.Excel"

Both machines have Excel 2003 installed, and I have a reference set to
Excel 11.0.


Bill,

I think you just need to put the file interop.excel.dll in the same folder
with your executable. That's probably the file that is missing.

You can rewrite the program to use late binding and then it wouldn't be
necessary.

Stan

--
Stan Smith
ADS Programming Services
Birmingham, AL
205-222-1661
ssmith_at_adsprogramming.com
Feb 16 '06 #6
"Stan Smith" <ss****@adsprogramming.com> schrieb
I think you just need to put the file interop.excel.dll in the same
folder with your executable. That's probably the file that is
missing.

He doesn't want to install the interop PIA. ("It seems like too much to have
the end users having to install the PIA.") I wrote that this is necessary to
run the app.
Armin

Feb 16 '06 #7
Thanks everyone for the help, sorry for the noob questions. I am maily
a vba programmer and I am making the switch to vb.net so I can write
stand alone apps.

I created an installer and it copies the proper .dll files. There is no
need to install the PIA's if the proper .dll file is in the same
directory as the application.

Thanks again for the guidance.

Feb 16 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Walter Dörwald | last post by:
Hello all! I'm trying to parse broken HTML with several Python tools. Unfortunately none of them work 100% reliable. Problems are e.g. nested comments, bare "&" in URLs and "<" in text (e.g....
9
by: Gary McGill | last post by:
I'm building a set of DLLs in .NET that I plan to call from a VB6 application. I've almost got that to work, but now I find that whenever I re-build any of my .NET DLLs, the reference to that...
0
by: brewhaha | last post by:
Greetings from the fifty-second parallel, My Sirs and Madams of Edmonton Public Library, the World Wide Web Consortium situated primarily at Michigan I.T., and Edmonton Community Network. To fail...
1
by: Greg G | last post by:
I apologize a second time if this is the third posting. I have had trouble getting my new passport account started. I have a VB6 application that I have converted to Visual Basic .NET 2003...
2
by: JD | last post by:
I'm trying to add a custom utility.mde reference to an application from code using the standard Application.References.AddFromFile code. IT has worked really well with A2K for a couple of years but...
0
by: Tanja Krammer | last post by:
Dear experts, Is it possible to add reference to the project with relative path? If I give out my VS projects links to references are broken, because of absolute path and I have no idea how to fix...
5
by: Tanja Krammer | last post by:
Dear all, is it possible to add reference with a relative path instead of absolute? Thanks,
24
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several...
9
Nathan H
by: Nathan H | last post by:
I am getting this error when I install an Access 2007 db with the packaged runtime engine on a machine running Office 2003. When I look at the references on the developing PC, the Microsoft Excel...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.