views:

73

answers:

3

This program will run 100% independently from anyone. Just the guy and his computer.

The SQLite database is just a little .db file right? I've also downloaded a driver for accessing the SQLite database using Entity Framework.

What would I need to deploy on a users machine? Just the folder with the .exe and the .db file?

Thanks.

+1  A: 

The computers on which your app is installed will need:

  • Access to the SQLite libraries (in the CWD, GAC or a configurable location). Anything SQLite is dependent on (file helpers, IoC) must also be included, but most of these third-party tools have their dependencies IL-Merged so you only have to worry about libraries belonging specifically to SQLite.
  • Access to the .db file (if you're not using in-memory SQLite; again, it can be in the CWD or a configurable location)
KeithS
+1  A: 

Since you indicate that your app is C# and SQLite is written in C, you must be referencing the SQLite DLL. When you distribute your app to the customer, you will need to include your exe, the SQLite DLL, and the MSVCRT.DLL that the SQLite DLL depends upon. If you have prebaked data in a database that needs to accompany your app, you can distribute that with your code as well. If there is no prebaked data, you can programatically create a new empty .db on the customer's machine the first time your app loads.

The SQLite DLL and its MSVCRT dependency can just be copied into the same directory as the app exe. It's just an "xcopy install", no registry settings or MSIs required for SQLite.

dthorpe
I'd recommend creating an install package for your program. I also had to create a 'DbProviderFactories' entry in App.config so that the DLL would load on the target machine, because I was using it that way.
MikeAinOz
+1  A: 

If you use the System.Data.SQLite library all you need to deploy is their one System.Data.SQlite.dll (about 900kb) in the same folder as your app, along with whichever .db files your app uses.

miket2e