|
My program (standalone Windows Forms app) references an assembly in a DLL file. When that DLL file is present in the same folder as the exe file, everything runs fine.
The classes in that referenced assembly are not used all the time. In fact, they are used only if a user decides to do certain optional things which most other users don't need most of the time. Hence I am thinking of removing that DLL from most users.
If I remove the DLL file, at some point in the program life cycle, an exception would arise with "Could not load file or assembly 'xxxxx, Version=.....' or one of its dependencies. The system cannot find the file specified." How can I trap the loading of the assembly so that I can give a better user experience by giving instructions to the user on how to get and install the DLL file for the few users who need the additional features or to simply ignore the absence of the assembly otherwise. |