Loaderlock problem

Forum for users of SQL Toolkit 3,4,and 5

Loaderlock problem

Postby jmei » Fri Dec 28, 2007 5:50 pm


I created a project using the API for SQL Compare and SQL Data Compare (the licenses.licx is included) and added it to my solution. When my application runs, it loads all the assemblies. But it got the "Loaderlock was detected" problem: DLL 'C:\\***\\bin\\Debug\\RedGate.Licensing.Helper.dll' is 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.

Is there anything I can do to avoid this problem?


Posts: 4
Joined: Mon Dec 03, 2007 4:53 pm

Postby Brian Donahue » Fri Dec 28, 2007 8:09 pm

Hi J,

I find it a bit odd, as this is supposed to be 'fixed' in version 6 of Toolkit (see the announcement at the top of this forum). When .NET 2 started stopping debugging for this exception, we had published a workaround to allow the code to run anyway, but as I said it isn't supposed to happen in any of the v6 libraries.

Hopefully this helps.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SQL Toolkit Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests