I'm using a C# library that has a pretty bad shutdown procedure and whenever I exit the application using Environment.exit, it throws an exception and my whole console application freezes with a popup message (debug/close/etc). I am running my application as a scheduled task so I'd prefer not to have to manually hit the close button every time it runs and crashes on exit. I've tried putting some try catches around it, and handling all exceptions, but it doesnt seem to work.
Is there a way to force an application exit and not allow any exceptions or anything that will cause it to crash?
Thanks -Jeff
Your solution seems to be there. [1]: http://stackoverflow.com/questions/3133199/net-global-exception-handler-in-console-application – Vladislav Aug 05 '14 at 11:46