"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."
在菜单中选择
Debug -> Exceptions -> Managed Debug Assistants
然后去掉LoaderLock 选项.
转载于:https://www.cnblogs.com/Sailorlee/archive/2009/08/14/1546108.html