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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • veer
    New Member
    • Jul 2007
    • 198

    #1

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

    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.FileN otFoundExceptio n: 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.EventHan dler.Invoke(Obj ect sender, EventArgs e)
    at System.Windows. Forms.Form.OnLo ad(EventArgs e)
    at System.Windows. Forms.Form.OnCr eateControl()
    at System.Windows. Forms.Control.C reateControl(Bo olean fIgnoreVisible)
    at System.Windows. Forms.Control.C reateControl()
    at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
    at System.Windows. Forms.Control.W ndProc(Message& m)
    at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
    at System.Windows. Forms.Container Control.WndProc (Message& m)
    at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
    at System.Windows. Forms.Form.WndP roc(Message& m)
    at System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
    at System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
    at System.Windows. Forms.NativeWin dow.Callback(In tPtr 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
  • CyberSoftHari
    Recognized Expert Contributor
    • Sep 2007
    • 488

    #2
    You should do proper installation, there may some dll, Ocx or any third party tool may missing which is having reference to your project.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      What other files are in that directory?
      There is probably the interop dll you use sitting there with it.

      Comment

      • veer
        New Member
        • Jul 2007
        • 198

        #4
        Hi
        yes there is interop.dll file in the debug directory and many other files like interop.dao.dll ,interop.excel. dll,interop.ado db.dll ,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.IOEx ception' occurred in Microsoft.Visua lBasic.dll

        what does this mean








        Originally posted by Plater
        What other files are in that directory?
        There is probably the interop dll you use sitting there with it.

        Comment

        • vijayB
          New Member
          • Mar 2008
          • 40

          #5
          Originally posted by veer
          Hi
          yes there is interop.dll file in the debug directory and many other files like interop.dao.dll ,interop.excel. dll,interop.ado db.dll ,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.IOEx ception' occurred in Microsoft.Visua lBasic.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..

          Comment

          • veer
            New Member
            • Jul 2007
            • 198

            #6
            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\d ebuging
            but im not getting the debugging tab

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


            varinder



            Originally posted by vijayB
            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..

            Comment

            Working...