WindowsForm Exception

G

Guest

I wrote a WindowsForms application and I compiled, installed, and run it on
my computer without any problems. When I install it on another computer that
doesn't have VS.NET installed I get the following error message immediately
after I double-click on its icon:

"MyApp.exe - Common Language Runtime Debugging Services
Application has generated an exception that could not be handled.
Proess id=0x884(2180), Thread id=0xb14(2386).
Click Ok to terminate the application.
Click CANCEL to debug the application.
"

The dot Net Framework is installed on all my computers and I have other
applications that I wrote before working fine on this computer. The problem
is I don't know where to look for the cause of this problem and since I don't
have a "Registered JIT debugger" on the machine in question I can't
troubleshoot it there.

I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
see if my application reaches the Form_Load stage before it generates the
error. And it never showed that message box. So I'm assuming the exception
occurs even before that!

Does any one know how we can troubleshoot/debug in this situation?
 
C

Chris

Amjad said:
I wrote a WindowsForms application and I compiled, installed, and run it on
my computer without any problems. When I install it on another computer that
doesn't have VS.NET installed I get the following error message immediately
after I double-click on its icon:

"MyApp.exe - Common Language Runtime Debugging Services
Application has generated an exception that could not be handled.
Proess id=0x884(2180), Thread id=0xb14(2386).
Click Ok to terminate the application.
Click CANCEL to debug the application.
"

The dot Net Framework is installed on all my computers and I have other
applications that I wrote before working fine on this computer. The problem
is I don't know where to look for the cause of this problem and since I don't
have a "Registered JIT debugger" on the machine in question I can't
troubleshoot it there.

I tried to add in the "Form_Load" event something like: 'Msgbox ("Test")' to
see if my application reaches the Form_Load stage before it generates the
error. And it never showed that message box. So I'm assuming the exception
occurs even before that!

Does any one know how we can troubleshoot/debug in this situation?

Just a shot in the dark but you could be getting a security exception.
Try to full trust the assembly and see if that helps.

Chris
 
G

Guest

It's already set to Full Trust, and I'm still getting the same
non-informative error message.

Any other ideas?
 
C

Chris

Amjad said:
It's already set to Full Trust, and I'm still getting the same
non-informative error message.

Any other ideas?


:

Try to wrap the entire program in a try... catch block. Start the
program in a module and do:

sub main
try
dim F as new Form1
Application.Run(F)
catch ex as exception
messagebox.show(ex.description)
end try
end sub

This may help you get a better idea what the error is.

Chris
 
G

Guest

Thanks Chris. That was a good idea.

The problem was one of the DLLs I used had the "Exclude" property set to
False for some reason!

Everything seems to be fine again now :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top