Note that there are some explanatory texts on larger screens.

plurals
  1. POSharing SQLite code between Monodroid and Winforms
    primarykey
    data
    text
    <p>I'm trying to share all my business logic code across three applications: an android app, an iOS app, and a Winforms app. All three of these applications need access to a local Sqlite database, and I had assumed I could use Mono.Data.Sqlite for all three to accomplish this. </p> <p>So, I've setup an Android class library along with a regular .NET class library, and linked the projects together. This works fine for everything except the Sqlite code. Am I not able to merely reference Mono.Data.Sqlite.dll and have it work in the Winforms application? If I do, it still doesn't fix the following errors:</p> <blockquote> <p>The type or namespace name 'SqliteConnection' could not be found (are you missing a using directive or an assembly reference?)</p> <p>The type or namespace name 'SqliteDataReader' could not be found (are you missing a using directive or an assembly reference?)</p> </blockquote> <p>Now, I would think adding a reference to the Mono Sqlite DLL would have resolved that issue, but apparently not. It can't even find the Mono namespace itself. </p> <p>I am thinking that I may need a Mono.Data.Sqlite DLL that has been compiled specifically for Windows, and not Android. Is this correct? If so, can I find a pre-compiled binary somewhere (preliminary searches returned nothing useful).</p> <p>Or will I have to write a wrapper for the SQLite code so that it just uses System.Data.SQLite in the Winforms app (which I am hoping to avoid, as the methods differ)? Will I have to do the same when deploying to MonoTouch? Is this going to be the case for almost all of the Mono framework? </p> <p>I'm just trying to wrap my head around codebase sharing with Mono and how it applies to multiple platforms. This is my first major hurdle so far. My goal is to have essentially one codebase for all the logic, and then just write native UI code for each platform. </p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload