I'm putting together a quick proof-of-concept application to explore the use of System.Data.SQLite for applications running on Windows Mobile 6.1 using .NET Compact Framework 3.5.
As long as I put the data access logic in the application, and make sure that System.Data.SqLite.dll and SqlLite.Interop.099.dll are located in the root of the project directory, everything works. As soon as I stray away from this kind of organization, things start to break. For example if I try to store the two dll files in a subfolder, I get the following error: System.MissingMethodException was unhandled Message="Can't find PInvoke DLL 'SQLite.Interop.099.dll'." Only moving them back to the project root, or manually copying both files post-build, will work. This is problematic but would be easy enough to work around if necessary. However we would normally maintain any data access logic in a separate project, and reference the DLL from the application. This does not seem to work at all regardless of how I organize the files, or whether I copy them all to the same directory post-build. In both cases (application or reference project) the two DLL files are set as "Content" and "Copy always". I get a completely different exception: System.MissingMethodException was unhandled Message="File or assembly name 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found." I would appreciate any insight that anyone can offer into this.