Ok, think along the lines of a plugin.
I have my own dll and it has it's own functionality. If a third-party dll is present, I'm extending a class inside from that dll.
Everything works great except if the third party DLL is missing. This is the crux of the problem.
I get this exception when the dll is not present:
"Could not load file or assembly 'SOME_THIRD_PARTY_ASSEMBLY, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
The idea is to allow additional functionality if the third party dll is present, don't allow the functionality if not present.
I know I can use Reflection to test whether a type exists, but in order to get to that part of the code, I have to make it past the above exception.
It's not that I JUST need to know if a class is available, I am also extending the class.
So in order for MY dll to compile, I need to add a reference to the third party dll in Visual Studio.
Can I catch this exception somewhere? Should I go about this differently?