Program throws Windows Error immediately on double click

kkonkle

Newcomer
Joined
Feb 9, 2004
Messages
20
Location
Ann Arbor, MI
I did some searching on Google and in these forums, but didn't find my issue.

I have a VB.Net Windows Forms program that will run fine out of Visual Studio, but when I build it and try to run it on someone's computer it immediately throws up a windows error and says it needs to close down.

I tried placing some message boxes in the Form Load event to see how far it gets. The first line of the Load event is one of my message boxes, but it doesn't even show that, the program dies before it treis to load my startup form I guess.

So I'm not sure how to trouble-shoot this since I can't even get into the code I've written, it just won't make it that far.

Has anyone seen this before? Any ideas on how I can test or otherwise gather some more info on where/how it's getting an error it doesn't like?
 
The .Net versions are the same.

The error is simply the generic (and uninformative) windows error:
"TransitionForms has encountered a problem and needs to close. We are sorry for the inconcenience."

And then it has the Send Report and Don't Send buttons.

I can click to see what data the error report contains, but it's just a bunch of assembly code and is not entirely useful to me.
 
When you run it on your PC are you logged on as admin? If so are you running as a different user on the target pc?

Have you tried it on any other PCs - just in case this is a problem specific to that one?
 
It may be that there is code running somewhere else before your Form_Load event. It could be in the InitializeConstructor function created by the form's designer, or in static class or module initialization code, or in your Sub Main. You don't think about it, but there's alot of code that is run before you get to your "entry point." One thing that can be real easy to overlook is field initializers. You could be calling all sorts of constructors to initialize variables long before you ever get to Form_Load.
 
Turns out it was missing some files it was dependant on. The error was very unhelpful, but we found that when we included a DLL of a 3rd party control we were using then the error did not occur. I'm not sure why it wouldn't put that DLL in the "Release" folder when I build the project, but whatever. In the end we add a "Setup Wizard" installer to the project, told it to include all dependencies, and now the installer handles everything and we get no errors. Thanks for your time.
 
Back
Top