Getting setup with SQLite on .NETCF 3.5

Jan 7, 2014 at 2:08 PM
I Saw a similar post but I'm just not following.

I downloaded the Binaries but when I look in the CF(Compact Framework???) folder I only see SqlCE dlls.

Should I be using the SQLite dlls in the FFX(???) folder? If so, how do I add the SQLite.Interop.dll to my project as it won't let me add it the "normal" way? It just says that it could not be added...
Jan 7, 2014 at 2:16 PM
Take a look at the Source Code tab. Navigate through it as follows (if you pull the source, it will be in the same place locally):


You will find two files:


The first is the managed assembly you add a reference to. The second is a native binary that must be deployed with the app, but does not need to be referenced.
Jan 7, 2014 at 2:25 PM

When you say deployed but not referenced; I add it to my project through "Add-->Existing File" and set it's Build Action-->Content?

Second, I see the two files you are talking about but I was also asking about OpenNET.ORM dlls... Am I supposed to Reference OpenNET.ORM.SQLite.FFx.dll and OpenNET.ORM.dll from the FFx folder? The CF folder only has OpenNET.ORM.SqlCe.dll....
Jan 7, 2014 at 2:41 PM
You can deploy it however you'd like. Adding it as a content item would work.

Each individual implementation must reference the OpenNETCF.ORM core library, yes. It won't compile without that. In the code base, they all have a project reference to it. You don't add any full-framework (FFx) references unless you're building for the desktop. All of this should be set up in the code base - is it not building as-is?
Jan 7, 2014 at 2:55 PM
No, the code base won't build as is and when I download the ORM Binaries there isn't any OpenNETCF.ORM.SQLite dlls in the CF folder.
Jan 7, 2014 at 3:03 PM
The existing release up there is pretty old. Let me see about getting a new one pushed. For the code, are you using the latest (i.e. not the stuff in the release zip) change set?
Jan 7, 2014 at 3:15 PM
I was using the zip, from the downloads page. I can give the latest change set a try if you think that'll help.
Jan 7, 2014 at 3:30 PM
Do I need to use Visual Studio 2008 to build the source? It looks like OpenNETCF.ORM.CF is still version 9...
Jan 7, 2014 at 3:33 PM
Compact Framework apps (pre CF 3.9) require Visual Studio 2008. No newer version of Studio is supported for anything except WEC 2013 and CF 3.9. That's not an ORM requirement, that's a Microsoft/CF requirement.
Jan 7, 2014 at 3:37 PM
Yup, I've already had tons of fun with that. Just wasn't sure if that applied to building this or not. Makes sense I guess now that I've said it 'out loud'. I would just need to build OpenNETCF.ORM and OpenNETCF.ORM.SQLite, correct?

Thanks for all of your help on this. Your responsiveness is greatly appreciated!
Jan 7, 2014 at 3:40 PM
Yes, if all you want is a SQLite ORM, then only those two projects are required. The default Solution contains all of the implementations, which you probably don't need.
Jan 7, 2014 at 3:52 PM
Edited Jan 7, 2014 at 3:57 PM
Wow, I can't get anything right today....

I am trying to Build the Solution OpenNETCF.ORM.CF and I have Errors. Firstly "DataStore.cs" and "IDataStore.cs" have a using to OpenNETCF.ORM.Replication that generates a "Type or namespace 'Replication' does not exist in the namespace 'OpenNETCF.ORM'.

In doing a Search of the entire Solution I could not find that Namespace anywhere...

Check that, I see a Replication Folder but it isn't included in the Solution....ideas???
Jan 7, 2014 at 4:00 PM
So, to get the latest source to compile, for CF, I had to Include in Project the Replication Folder and the ISQLBasedStore.cs in the Interfaces folder. Now on to the next step...
Jan 7, 2014 at 8:11 PM
Next step was a fail as well....

Not all Members of ISQLBasedStore are implemented in SQLiteDataStore.cs....
Jan 7, 2014 at 8:13 PM
Let me back-integrate (or pull an older change set pre-replication). The challenge is that I maintain this code base on multiple source control servers and occasionally they get out of sync. The "master" copy is actually on an internal server to us, so I need to merge it back into the CodePlex source. I can get it done, but probably not today. Maybe tomorrow.
Jan 7, 2014 at 9:19 PM
Thanks for following up, I'll keep an eye out.
Jan 8, 2014 at 1:32 AM
I've merged the code. Still have to roll a release, but it should get you a lot further than it was.
Jan 8, 2014 at 2:27 PM
Gotcha, thanks. I should use the latest commit then, 104901 and compile the binary's I need myself but I should now be able to do that?
Jan 8, 2014 at 2:47 PM
Correct. I hope to get build binaries up today, but until then you will have to build them yourself.
Jan 9, 2014 at 8:16 PM
I see you did get the build binaries up, thanks. However, I am still not seeing any OpenNETCF.ORM.SQLite.dll in the CF folder. Just SqlCE stuff....should I be using the SQLite files from the FFx folder for CF dev?
Jan 9, 2014 at 9:18 PM
No, FFx assemblies will never work in the CF for any library. You must use CF-specific assemblies. The CF project wasn't building the outputs to the right place. I've fixed it and updated the binary release package.
Jan 9, 2014 at 9:32 PM
Gotcha, I kind of figured that but wasn't sure based on what I was seeing. Thanks for all the work, I appreciate it.