How to tell if calling assembly is in DEBUG mode from compiled referenced lib
<p>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. </p>

<p>Is it possible to switch on the condition that the calling assembly is in DEBUG/RELEASE mode?</p>

<p>Is there a way to do this without resorting to something like:</p>

<pre><code>bool debug = false;

#if DEBUG
debug = true;
#endif

referencedlib.someclass.debug = debug;
</code></pre>

<p>The referencing assembly will always be the starting point of the application (i.e. web application.</p>
