I have a referenced library, inside there I want to perform a different action if the assembly that references it is in DEBUG/RELEASE mode.
Is it possible to switch on the condition that the calling assembly is in DEBUG/RELEASE mode?
Is there a way to do this without resorting to something like:
bool debug = false;
#if DEBUG
debug = true;
#endif
referencedlib.someclass.debug = debug;
The referencing assembly will always be the starting point of the application (i.e. web application.
Google says it is very simple. You get the information from the DebuggableAttribute of the assembly in question: