[.net] .NET 2.0 "OS Loader Lock" exception

Started by
11 comments, last by DmGoober 17 years, 8 months ago
Quote:Original post by Krisc
I got the error when trying to create an instance and initialize a Device inside a constructor. Perhaps that is your problem, even though it has nothing to do with DirectX?

No. The issue here is that SQLiteNet.dll is a mixed-mode (contains both managed and unmanaged code) DLL compiled with either Visual Studio 2002 or 2003. All 2002-compiled DLLs will have this problem as well as most 2003 DLLs. The only way to deal with it is to turn off the warning.

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Advertisement
I also had this problem today. I fixed it with help from this article:

http://msdn2.microsoft.com/en-us/library/ms173267.aspx


...but I had the source file to recompile.
This worked for me:
1) Remove the references to the assemblies that are LoaderLocking. (I recommend writing down the path to the assembly so you don't forget it.)
2) Rebuild. The build will fail.
3) Add back the references to the assemblies you just removed.
4) Rebuild and re-run.

Alexander
Alexander "DmGoober" Jhinalexjh@online.microsoft.com[Warning! This email account is not attended. All comments are the opinions of an individual employee and are not representative of Microsoft Corporation.]

This topic is closed to new replies.

Advertisement