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.
- Where do I start trying to figure this out?
- What is LoaderLock and why is it bothering me now?
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.
I went to Debug -> Exceptions -> "Managed Debugging Assistants"
, found "LoaderLock"
and unchecked the "Thrown"
checkbox.
I can debug again but what did I do and why did I have to do it? Will this cause other problems for me?