Compile error

Hello Paul, my name is Mike Clark and I am a software developer. I had
a question about an execution error, when I try to execute my project. I
code in VB .Net (using the earlier version of Visual Studios .Net not
the new 2005 version). Anyway I have successfully compiled the project
on the computer it is being developed on, but when I try to execute it
on a different computer, I get the following error.

"Application has generated an exception that could not be handled.

Process id=0x844(2116), Thread id=0x4b8(1208).

Click OK to terminate the application.
Click CANCEL to debug the application."

I've ran this program on this computer before when it was in its earlier
development stage, and it ran just fine, when I burnt this current
project to a disk I copied over the entire bin directory that Visual
Studios .Net automatically creates when you compile your project. What
could have happened
Do you know how I can fix it I really appreciate your help, I saw
your email posting on the msdn forums and saw that you work for
Microsoft and thought who better to ask Thanks a lot Paul I really
appreciate the help.

~Mike


Answer this question

Compile error

  • Gabslost

    If the two machines are networked together, you could try remote debugging.

    Otherwise, you might be able to use cordbg.exe to debug your application.

    You'll find cordbg.exe on your Visual Studio 2003 machine under the following path:

    %ProgramFiles%\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\cordbg.exe

    Copy it onto the failing machine into the same directory where you put your application. Run cordbg from there. You should see a (cordbg) prompt. To run your application under the cordbg debugger, let's say your applcation is called "yourapp.exe", you type:

    run yourapp.exe

    You'll probably get a few lines of output saying that symbols could not be found. You may also get an exception at this point if you are missing references to assemblies that are not installed on this machine. If so, look carefully at the output because it'll say somewhere what assembly was missing. If that doesn't help, now type:

    go

    When you hit enter, the application will run. If any unhandled exception is hit, the debugger will stop and the unhandled exception will be printed out to the cordbg window.

    When you have finished debugging, type

    quit

    to exit cordbg.

    Hope that helps.



  • Mónika

    What happens when you click "Cancel" You should get an opportunity to debug your application. Your application will be opened in the debugger that is registered on the other computer and you should be able to see the exact exception that occurred.

    My best guess is that there is some missing component on the other computer that you will also need to add.

    Is your application a console application or a Windows Forms application

    Also, if you get this error with the "Release" version of your application, you can try building the "Debug" flavor instead and running that.

    - Paul



  • CBInc

    When I clicked cancel the application just closed, then I got another dialog error saying it couldn't find the debug environmnent. I think what I need to do is to just find a computer that has a working debuger in it. I just found it strange that it compiles with no errors on my local environmnet but when I take it out to test it, it fails. I will see what I can do.

    Thanks Paul

    ~Mike


  • Compile error