Reputation: 1202
I want my program in case of missing .dll
file to notify user about this fact instead of just crashing with FileNotFoundException
reffering to this .dll
.
This library is included to the project via refference.
Exception is thrown even before any of my code is executed so I can't hadle it.
Upvotes: 0
Views: 532
Reputation: 81493
Your only 2 options are (as far as i know)
This question may get you started on option one
However : i guess its just easier to make sure they have the dll or include it in the build
Upvotes: 1
Reputation: 4154
During application start up, you can register app domain for any unhandled exception as :
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Your handler should take care of showing appropriate message to user.
Upvotes: 0