error when opening excel file

shankar

Member
Joined
Dec 14, 2002
Messages
12
Hello,
I have two problems.
1. I am trying to read an excel file from my VB.NET application. In debug mode from visual studio, I am able to open it without any problems. But when i execute the exe of my application independently, I get the exception File or assembly name Interop.Excel, or one its dependencies, was not found. What am I missing here?

2.I am also not very much aware of distributing applications. Right now I just copy the exe file in \obj\Debug and try to run it. How am I supposed to package and distribute my application? Will it be enough if I just distribute the exe file mentioned above?
Could anyone guide me on this.
Thanks in advance,
SHankar
 
Your application is looking for the Interop.Excel.dll files.

You should not copy files from the obj\Debug folder. This folder is used by Visual Studio while its performing background compilation of your solution and isnt meant to be deployed. Instead, look in the Bin folder. In there should be your EXE file and any dll dependancies it may have. It should be sufficient to copy these to the target location. Nothing should need registering, provided your user has Excel installed.

If you DO want to make a proper install wizard, Visual Studio .NET comes with a setup project template you can use. It should be there along with the VB.NET and C# projects when you create a new project. If you do that, it will (or should) detect any dependancies and package them in with your app.
 
Back
Top