By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

problem in running the exe on any location other than debug folder

100+
P: 198
Hi
i am getting probleum in running the exe on any other location on my computer except bin\debug when i execute the exe file which is in bin\debug folder it works fine and when i copy this exe and save on any location like desktop ,D:,C: it shows a dialog box which contains the follwoing errors
************************************************** ***********************************
System.IO.FileNotFoundException: Could not load file or assembly 'Interop.DAO, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.DAO, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null'
at Create_FinTiff.frmMain.frmMain_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************************************************** ****************************************
please tell me what is going to be wrong with my code or how i can make my exe so that it could not display this error

with best regards
varinder
Jun 7 '08 #1
Share this Question
Share on Google+
5 Replies


Expert 100+
P: 487
You should do proper installation, there may some dll, Ocx or any third party tool may missing which is having reference to your project.
Jun 7 '08 #2

Plater
Expert 5K+
P: 7,872
What other files are in that directory?
There is probably the interop dll you use sitting there with it.
Jun 9 '08 #3

100+
P: 198
Hi
yes there is interop.dll file in the debug directory and many other files like interop.dao.dll,interop.excel.dll,interop.adodb.dl l ,office.dll and if i copy all the files in the other directory with exe then it works fine .Is there any thing wrong in my project so that with out these dll files how can i run my exe
i also want to know
------ every time when i execute my programe the follwoing lines are displayed in immediate window

A first chance exception of type 'System.IO.IOException' occurred in Microsoft.VisualBasic.dll

what does this mean








What other files are in that directory?
There is probably the interop dll you use sitting there with it.
Jun 10 '08 #4

P: 40
Hi
yes there is interop.dll file in the debug directory and many other files like interop.dao.dll,interop.excel.dll,interop.adodb.dl l ,office.dll and if i copy all the files in the other directory with exe then it works fine .Is there any thing wrong in my project so that with out these dll files how can i run my exe
i also want to know
------ every time when i execute my programe the follwoing lines are displayed in immediate window

A first chance exception of type 'System.IO.IOException' occurred in Microsoft.VisualBasic.dll

what does this mean
Hmmm,
The exe which is getting created in bin\debug folder is not the actual one.
Build your project in release mode, you will get same exe at bin\release.
Then either use installshield or you can use setup wizard provided by VS 2k5 IDE. Through any of the above create setup, properly install it like any other software.
It should work..
Jun 10 '08 #5

100+
P: 198
thanks for reply
it is working

i asked you antoher question in my previous post
how i disable exception like "A FIRST CHANCE EXCEPTION OCCURS OF TYPE " in vs2008

i got the idea by browsing on net and find
tools\options\debuging
but im not getting the debugging tab

is it right method if not then please how to do it


varinder



Hmmm,
The exe which is getting created in bin\debug folder is not the actual one.
Build your project in release mode, you will get same exe at bin\release.
Then either use installshield or you can use setup wizard provided by VS 2k5 IDE. Through any of the above create setup, properly install it like any other software.
It should work..
Jun 11 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.