title: Why am I getting the "LoaderLock was detected" warning when debugging?
body: <p>I'm developing an add-on for AutoCAD 2009. The project output is a class library. When I attempt to debug and load the class library, I get this "LoaderLock was detected message." I've been writing these add-ons for awhile and this is the first message of this type I've seen.</p>
  
  <ol>
  <li>Where do I start trying to figure this out?</li>
  <li>What is LoaderLock and why is it bothering me now?</li>
  </ol>
  
  <p>LoaderLock was detected
  Message: Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.</p>
  
  <p>I went to <code>Debug -&gt; Exceptions -&gt; "Managed Debugging Assistants"</code>, found <code>"LoaderLock"</code> and unchecked the <code>"Thrown"</code> checkbox.</p>
  
  <p>I can debug again but what did I do and why did I have to do it? Will this cause other problems for me?</p>