[RESOLVED] Deployment and Exception Handling
I have an application which has a "global" exception handler that runs at the very begining of the application (see code below). Everything runs fine in the IDE, however, when I install the application on computers the "global" exception never fires. I am using the VS.NET 2005 Setup Project to create the setup files which are installed on pc's. It would seem that there is some problem with the deployment version of the application, but I dont know for sure.
Any idea's how to fix the problem?
Code:
Try
Application.Run(LogInForm)
Catch eData As DataException
MessageBox.Show(eData.Message, "ADO.NET Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch eSql As SqlException
MessageBox.Show(eSql.Message, "SQL Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Catch eSystem As Exception
MessageBox.Show(eSystem.Message, "General System Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Re: Deployment and Exception Handling
If you run the exe run on your development machine does the event fire?
Re: Deployment and Exception Handling
Make sure you set to "Release" instead of "Debug" when compiling the app before deploying it.
-tg
Re: Deployment and Exception Handling
I tried to run the .exe on my development machine and it didn't fire.
I also tried setting both the application and deployment configurations to release instead of debug.... still no luck.
Any other suggestions? Are there any other preq's it needs other than the defaults?
Re: Deployment and Exception Handling
I decided to try a different way to handle the exceptions. I used something similar to what is show at this website. Seems to be working alright after I deploy the application.
Thanks for the help!