Search code examples
c#sqlitewindows-cesmart-device

How to Setup Sqlite for HHpc/Windowsce Device in Visual Studio Smart Device Project?


In winforms application/asp.net sqlite works if i reference sqlite.dll.

But when i try this to smart Device Project it fails to build because of this error:

Can't find PInvoke DLL 'SQLite.Interop.DLL'.

What did i did is also reference system.Data.SqLite.dll in my project file, add also it windows folder of my device(Windows SE Emulator/Datalogic Memor windows ce 5.0).

Any one here experience this and resolve this problem? Currently i am using SQLcompact 3.5 for the handhelds but i encounter drawbacks in terms of speed and capacity and i know that sqlite will solve it.

Thanks in Regards.


Solution

  • I Got the solution:

    We need to Add SQLite.Interop.066.DLL in the project root folder.

    Then right click to SQLite.Interop.066.DL to view its properties.

    Next Set its Build Action = Content and Copy to Output Directory = Copy if newer

    Rebuild/Build the project and try to test it again.