Monday, March 18, 2013

“LoaderLock was detected” warning when debugging

When debugging a Outlook Add-In in Visual Studio 2010, I got message below.

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.


Solution is to simply uncheck "LoaderLock" in Debug | Exceptions | Managed Debugging Assistants.

(If the Debug menu does not contain an Exceptions command, click Customize on the Tools menu to add it.)

http://msdn.microsoft.com/en-us/library/d21c150d(v=vs.100).aspx




No comments: